public void TestCurrentLearnRate()
		{
			var afm = new SigmoidCombinedAsymmetricFactorModel() { LearnRate = 1.1f, Ratings = TestUtils.CreateRatings() };

			afm.InitModel();
			Assert.AreEqual(1.1f, afm.LearnRate);
			Assert.AreEqual(1.1f, afm.current_learnrate);
		}
		public void TestFoldIn()
		{
			var afm = new SigmoidCombinedAsymmetricFactorModel() { Ratings = TestUtils.CreateRatings() };
			afm.Train();
			var user_ratings = new List<Tuple<int, float>>();
			user_ratings.Add(new Tuple<int, float>(0, 4.0f));
			var candidate_items = new List<int> { 0, 1 }; // have a known and an unknown item
			var results = afm.ScoreItems(user_ratings, candidate_items);
			Assert.AreEqual(2, results.Count);
		}
		public void TestMatrixInit()
		{
			var afm = new SigmoidCombinedAsymmetricFactorModel() { Ratings = TestUtils.CreateRatings() };
			afm.InitModel();
			Assert.IsNotNull(afm.user_factors);
			Assert.IsNotNull(afm.item_factors);
			Assert.IsNotNull(afm.x);
			Assert.IsNotNull(afm.y);
			Assert.IsNotNull(afm.user_bias);
			Assert.IsNotNull(afm.item_bias);
		}
		public void TestDecay()
		{
			var afm = new SigmoidCombinedAsymmetricFactorModel()
			{
				LearnRate = 1.0f, Decay = 0.5f,
				NumIter = 1, Ratings = TestUtils.CreateRatings()
			};

			afm.Train();
			Assert.AreEqual(0.5f, afm.current_learnrate);

			afm.Iterate();
			Assert.AreEqual(0.25f, afm.current_learnrate);
		}
		public void TestDefaultBehaviorIsNoDecay()
		{
			var afm = new SigmoidCombinedAsymmetricFactorModel() { LearnRate = 1.1f, NumIter = 10, Ratings = TestUtils.CreateRatings() };
			afm.Train();
			Assert.AreEqual(1.1f, afm.current_learnrate);
		}