예제 #1
0
        public void test_AlphaEstimateSingle_return_correct_value()
        {
            /*lm(testList ~ testList2) returns β0 = 6.8778. Calculated with R*/

            Assert.AreEqual(6.8778, Math.Round(Regression.AlphaEstimateSingle(testList, testList2), 4));
            Assert.AreNotEqual(6.8779, Math.Round(Regression.AlphaEstimateSingle(testList, testList2), 4));
        }
예제 #2
0
 public void test_AlphaEstimateSingle_different_counts_throws_MathError()
 {
     testList.Add(1);
     Assert.Throws <MathError>(() => Regression.AlphaEstimateSingle(testList2, testList));
     testList.RemoveAt(testList.Count - 1);
 }
예제 #3
0
 public void test_AlphaEstimateSingle_null_list_throws_MathError()
 {
     Assert.Throws <MathError>(() => Regression.AlphaEstimateSingle(null, testList));
 }