InitModel() protected method

protected InitModel ( ) : void
return void
Exemplo n.º 1
0
        public void TestCurrentLearnRate()
        {
            var mf = new SocialMF() { LearnRate = 1.1f, Ratings = TestUtils.CreateRatings(), UserRelation = new SparseBooleanMatrix() };

            mf.InitModel();
            Assert.AreEqual(1.1f, mf.LearnRate);
            Assert.AreEqual(1.1f, mf.current_learnrate);
        }
Exemplo n.º 2
0
		public void TestMatrixInit()
		{
			var mf = new SocialMF() { Ratings = TestUtils.CreateRatings(), UserRelation = new SparseBooleanMatrix() };
			mf.InitModel();
			Assert.IsNotNull(mf.user_factors);
			Assert.IsNotNull(mf.item_factors);
			Assert.IsNotNull(mf.user_bias);
			Assert.IsNotNull(mf.item_bias);
		}