public void Bad4() { CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { 43, 21, 25, 42, 57, 59 }; double[] independents = new double[] { 99, 65, 79, 75, 87 }; correlation.SetDependents(dependents); Assert.AreEqual(0, correlation.GetPearsons().Length); }
public void Bad2() { CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { 43, 21, 25, 42, 57, 59 }; double[] independents = new double[] { 99, 65, 79, 75, 87 }; correlation.SetDependents(dependents); correlation.AddIndependents(independents); double coef = Math.Round(correlation.GetPearsons()[0], 6); }
public void Bad4() { CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { 106, 86, 100, 101, 99, 103, 97, 113, 112, 110 }; double[] independents = new double[] { 7, 0, 27, 50, 28, 29, 20, 12, 6, 17 }; correlation.SetDependents(dependents); Assert.AreEqual(0, correlation.GetSpearmans().Length); }
public void Bad2() { CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { 106, 86, 100, 101, 99, 103, 97, 113, 112, 110 }; double[] independents = new double[] { 7, 0, 27, 50, 28, 29, 20, 12, 6 }; correlation.SetDependents(dependents); correlation.AddIndependents(independents); double coef = Math.Round(correlation.GetSpearmans()[0], 6); }
public void GetPearson2() { CorrelationCalc correlation = new CorrelationCalc(); double[] independents = new double[] { 43, 21, 25, 42, 57, 59 }; double[] dependents = new double[] { 99, 65, 79, 75, 87, 81 }; correlation.SetDependents(dependents); correlation.AddIndependents(independents); double coef = Math.Round(correlation.GetPearsons()[0], 6); Assert.AreEqual(0.529809, coef); }
public void GetSpearman1() { CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { 106, 86, 100, 101, 99, 103, 97, 113, 112, 110 }; double[] independents = new double[] { 7, 0, 27, 50, 28, 29, 20, 12, 6, 17 }; correlation.SetDependents(dependents); correlation.AddIndependents(independents); double coef = Math.Round(correlation.GetSpearmans()[0], 6); Assert.AreEqual(-0.175758, coef); }
public void CreateGraphs() { string dir = String.Empty; CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { 43, 21, 25, 42, 57, 59 }; double[] independents = new double[] { 99, 65, 79, 75, 87, 81 }; double[] independents2 = new double[] { 65, 99, 81, 87, 75, 79 }; correlation.SetDependents(dependents, "IQ"); correlation.AddIndependents(independents, "reading time"); correlation.AddIndependents(independents2, "sleeping time"); correlation.MakeGraphs(dir, true, true); }
public void SetDependent() { CorrelationCalc correlation = new CorrelationCalc(); double[] dependents = new double[] { }; correlation.SetDependents(dependents); }