Пример #1
0
        public void TestMatrixInit()
        {
            var mf = new MatrixFactorization()
            {
                Ratings = TestUtils.CreateRatings()
            };

            mf.InitModel();
            Assert.IsNotNull(mf.user_factors);
            Assert.IsNotNull(mf.item_factors);
        }
Пример #2
0
        public void TestCurrentLearnRate()
        {
            var mf = new MatrixFactorization()
            {
                LearnRate = 1.1f, Ratings = TestUtils.CreateRatings()
            };

            mf.InitModel();
            Assert.AreEqual(1.1f, mf.LearnRate);
            Assert.AreEqual(1.1f, mf.current_learnrate);
        }