- Timestamp:
- 10/06/11 11:29:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/StatisticCalculatorsTest.cs
r6866 r6880 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Problems.DataAnalysis; 25 26 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 60 61 { 61 62 for (int col = 0; col < cols; col++) { 62 double scale = random.NextDouble() * 1E7;63 double scale = random.NextDouble(); 63 64 IEnumerable<double> x = from rows in Enumerable.Range(0, n) 64 65 select testData[rows, col] * scale; … … 77 78 double variance = calculator.Variance; 78 79 79 Assert. AreEqual(mean_alglib.ToString(), mean.ToString());80 Assert. AreEqual(variance_alglib.ToString(), variance.ToString());80 Assert.IsTrue(mean_alglib.IsAlmost(mean)); 81 Assert.IsTrue(variance_alglib.IsAlmost(variance)); 81 82 } 82 83 } … … 108 109 double r2 = r2Calculator.RSquared; 109 110 110 Assert. AreEqual(r2_alglib.ToString(), r2.ToString());111 Assert.IsTrue(r2_alglib.IsAlmost(r2)); 111 112 } 112 113 }
Note: See TracChangeset
for help on using the changeset viewer.