Changeset 9785
- Timestamp:
- 07/26/13 14:11:33 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.Tests
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/OnlineCalculatorPerformanceTest.cs
r9764 r9785 23 23 using System.Diagnostics; 24 24 using System.Linq; 25 using HeuristicLab.Problems.DataAnalysis;26 25 using HeuristicLab.Random; 27 26 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 35 34 36 35 private TestContext testContextInstance; 37 38 36 /// <summary> 39 37 ///Gets or sets the test context which provides … … 47 45 48 46 [TestMethod] 47 [TestCategory("Problems.DataAnalysis")] 48 [TestProperty("Time", "medium")] 49 49 public void OnlineAccuracyCalculatorPerformanceTest() { 50 50 TestCalculatorPerfomance(OnlineAccuracyCalculator.Calculate); 51 51 } 52 52 [TestMethod] 53 [TestCategory("Problems.DataAnalysis")] 54 [TestProperty("Time", "medium")] 53 55 public void OnlineCovarianceCalculatorPerformanceTest() { 54 56 TestCalculatorPerfomance(OnlineCovarianceCalculator.Calculate); 55 57 } 56 58 [TestMethod] 59 [TestCategory("Problems.DataAnalysis")] 60 [TestProperty("Time", "medium")] 57 61 public void OnlineMeanAbsolutePercentageErrorCalculatorPerformanceTest() { 58 62 TestCalculatorPerfomance(OnlineMeanAbsolutePercentageErrorCalculator.Calculate); … … 60 64 61 65 [TestMethod] 66 [TestCategory("Problems.DataAnalysis")] 67 [TestProperty("Time", "medium")] 62 68 public void OnlineMeanSquaredErrorCalculatorPerformanceTest() { 63 69 TestCalculatorPerfomance(OnlineMeanSquaredErrorCalculator.Calculate); 64 70 } 65 71 [TestMethod] 72 [TestCategory("Problems.DataAnalysis")] 73 [TestProperty("Time", "medium")] 66 74 public void OnlineNormalizedMeanSquaredErrorCalculatorPerformanceTest() { 67 75 TestCalculatorPerfomance(OnlineNormalizedMeanSquaredErrorCalculator.Calculate); 68 76 } 69 77 [TestMethod] 78 [TestCategory("Problems.DataAnalysis")] 79 [TestProperty("Time", "medium")] 70 80 public void OnlinePearsonsRSquaredCalculatorPerformanceTest() { 71 81 TestCalculatorPerfomance(OnlinePearsonsRSquaredCalculator.Calculate); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/StatisticCalculatorsTest.cs
r9764 r9785 23 23 using System.Linq; 24 24 using HeuristicLab.Common; 25 using HeuristicLab.Problems.DataAnalysis;26 25 using Microsoft.VisualStudio.TestTools.UnitTesting; 27 26 namespace HeuristicLab.Problems.DataAnalysis.Tests { … … 54 53 55 54 [TestMethod] 55 [TestCategory("Problems.DataAnalysis")] 56 [TestProperty("Time", "short")] 56 57 public void CalculateMeanAndVarianceTest() { 57 58 System.Random random = new System.Random(31415); … … 85 86 86 87 [TestMethod] 88 [TestCategory("Problems.DataAnalysis")] 89 [TestProperty("Time", "short")] 87 90 public void CalculatePearsonsRSquaredTest() { 88 91 System.Random random = new System.Random(31415); … … 114 117 } 115 118 } 116 [TestMethod] 119 120 [TestMethod] 121 [TestCategory("Problems.DataAnalysis")] 122 [TestProperty("Time", "short")] 117 123 public void CalculatePearsonsRSquaredOfConstantTest() { 118 124 System.Random random = new System.Random(31415); … … 141 147 142 148 [TestMethod] 149 [TestCategory("Problems.DataAnalysis")] 150 [TestProperty("Time", "short")] 143 151 public void CalculateHoeffdingsDTest() { 144 152 OnlineCalculatorError error; -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ThresholdCalculatorsTest.cs
r9764 r9785 20 20 #endregion 21 21 22 using HeuristicLab.Problems.DataAnalysis;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 23 24 24 namespace HeuristicLab.Problems.DataAnalysis.Tests { 25 25 … … 27 27 public class ThresholdCalculatorsTest { 28 28 [TestMethod] 29 [TestCategory("Problems.DataAnalysis")] 30 [TestProperty("Time", "short")] 29 31 public void NormalDistributionCutPointsThresholdCalculatorTest() { 30 32 -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionCrossoverTest.cs
r9764 r9785 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 using HeuristicLab.Problems.DataAnalysis.Symbolic;30 29 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression; 31 30 using HeuristicLab.Random; … … 49 48 50 49 [TestMethod] 50 [TestCategory("Problems.DataAnalysis")] 51 [TestProperty("Time", "long")] 51 52 public void SymbolicDataAnalysisExpressionSemanticSimilarityCrossoverPerformanceTest() { 52 53 var problem = new SymbolicRegressionSingleObjectiveProblem(); … … 56 57 57 58 [TestMethod] 59 [TestCategory("Problems.DataAnalysis")] 60 [TestProperty("Time", "long")] 58 61 public void SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossoverPerformanceTest() { 59 62 var problem = new SymbolicRegressionSingleObjectiveProblem(); … … 63 66 64 67 [TestMethod] 68 [TestCategory("Problems.DataAnalysis")] 69 [TestProperty("Time", "long")] 65 70 public void SymbolicDataAnalysisExpressionDeterministicBestCrossoverPerformanceTest() { 66 71 var problem = new SymbolicRegressionSingleObjectiveProblem(); … … 70 75 71 76 [TestMethod] 77 [TestCategory("Problems.DataAnalysis")] 78 [TestProperty("Time", "long")] 72 79 public void SymbolicDataAnalysisExpressionContextAwareCrossoverPerformanceTest() { 73 80 var problem = new SymbolicRegressionSingleObjectiveProblem(); … … 77 84 78 85 [TestMethod] 86 [TestCategory("Problems.DataAnalysis")] 87 [TestProperty("Time", "long")] 79 88 public void SymbolicDataAnalysisExpressionDepthConstrainedCrossoverPerformanceTest() { 80 89 var problem = new SymbolicRegressionSingleObjectiveProblem(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
r9764 r9785 25 25 using System.Linq; 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Problems.DataAnalysis.Symbolic;28 27 using HeuristicLab.Random; 29 28 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 52 51 53 52 [TestMethod] 53 [TestCategory("Problems.DataAnalysis")] 54 [TestProperty("Time", "long")] 54 55 public void SymbolicDataAnalysisExpressionTreeInterpreterTypeCoherentGrammarPerformanceTest() { 55 56 TypeCoherentGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6); 56 57 } 57 [TestMethod] 58 59 [TestMethod] 60 [TestCategory("Problems.DataAnalysis")] 61 [TestProperty("Time", "long")] 58 62 public void SymbolicDataAnalysisExpressionTreeInterpreterFullGrammarPerformanceTest() { 59 63 FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6); 60 64 } 61 [TestMethod] 65 66 [TestMethod] 67 [TestCategory("Problems.DataAnalysis")] 68 [TestProperty("Time", "long")] 62 69 public void SymbolicDataAnalysisExpressionTreeInterpreterArithmeticGrammarPerformanceTest() { 63 70 ArithmeticGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6); … … 65 72 66 73 [TestMethod] 74 [TestCategory("Problems.DataAnalysis")] 75 [TestProperty("Time", "long")] 67 76 public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterTypeCoherentGrammarPerformanceTest() { 68 77 TypeCoherentGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6); 69 78 } 70 [TestMethod] 79 80 [TestMethod] 81 [TestCategory("Problems.DataAnalysis")] 82 [TestProperty("Time", "long")] 71 83 public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterFullGrammarPerformanceTest() { 72 84 FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6); 73 85 } 86 87 [TestCategory("Problems.DataAnalysis")] 88 [TestProperty("Time", "long")] 74 89 [TestMethod] 75 90 public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterArithmeticGrammarPerformanceTest() { … … 135 150 ///</summary> 136 151 [TestMethod] 152 [TestCategory("Problems.DataAnalysis")] 153 [TestProperty("Time", "short")] 137 154 public void SymbolicDataAnalysisExpressionTreeInterpreterEvaluateTest() { 138 155 Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] { … … 158 175 159 176 [TestMethod] 177 [TestCategory("Problems.DataAnalysis")] 178 [TestProperty("Time", "short")] 160 179 public void SymbolicDataAnalysisExpressionILEmittingTreeInterpreterEvaluateTest() { 161 180 Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] { … … 411 430 try { 412 431 Evaluate(interpreter, ds, "(psi " + x + ")", 0, alglib.psi(x)); 413 } 414 catch (alglib.alglibexception) { // ignore cases where alglib throws an exception 432 } catch (alglib.alglibexception) { // ignore cases where alglib throws an exception 415 433 } 416 434 }; -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs
r9764 r9785 23 23 using System.Collections.Generic; 24 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 25 using HeuristicLab.Problems.DataAnalysis.Symbolic;26 25 using Microsoft.VisualStudio.TestTools.UnitTesting; 27 26 … … 30 29 [TestClass()] 31 30 public class SymbolicDataAnalysisExpressionTreeSimplifierTest { 31 32 32 [TestMethod] 33 [TestCategory("Problems.DataAnalysis")] 34 [TestProperty("Time", "short")] 33 35 public void SimplifierAxiomsTest() { 34 36 SymbolicExpressionImporter importer = new SymbolicExpressionImporter(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionImporter.cs
r9764 r9785 25 25 using System.Linq; 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Problems.DataAnalysis.Symbolic;28 27 29 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests { … … 86 85 StartSymbol startSymbol = new StartSymbol(); 87 86 88 public SymbolicExpressionImporter() {89 }90 91 87 internal ISymbolicExpressionTree Import(string str) { 92 88 str = str.Replace("(", " ( ").Replace(")", " ) "); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs
r9764 r9785 25 25 using System.Linq; 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Problems.DataAnalysis.Symbolic;28 27 using HeuristicLab.Random; 29 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests { -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
r9764 r9785 25 25 using System.Linq; 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis;28 27 using HeuristicLab.Problems.DataAnalysis.Symbolic.Tests; 29 28 using HeuristicLab.Random; … … 36 35 private const int Rows = 100; 37 36 private const int Columns = 50; 38 private TestContext testContextInstance;39 40 /// <summary>41 ///Gets or sets the test context which provides42 ///information about and functionality for the current test run.43 ///</summary>44 public TestContext TestContext {45 get {46 return testContextInstance;47 }48 set {49 testContextInstance = value;50 }51 }52 37 53 38 [TestMethod] 39 [TestCategory("Problems.DataAnalysis")] 40 [TestProperty("Time", "long")] 54 41 public void SymbolicTimeSeriesPrognosisTreeInterpreterTypeCoherentGrammarPerformanceTest() { 55 42 TypeCoherentGrammarPerformanceTest(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6); 56 43 } 44 57 45 [TestMethod] 46 [TestCategory("Problems.DataAnalysis")] 47 [TestProperty("Time", "long")] 58 48 public void SymbolicTimeSeriesPrognosisTreeInterpreterFullGrammarPerformanceTest() { 59 49 FullGrammarPerformanceTest(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6); 60 50 } 51 61 52 [TestMethod] 53 [TestCategory("Problems.DataAnalysis")] 54 [TestProperty("Time", "long")] 62 55 public void SymbolicTimeSeriesPrognosisTreeInterpreterArithmeticGrammarPerformanceTest() { 63 56 ArithmeticGrammarPerformanceTest(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6); … … 122 115 ///</summary> 123 116 [TestMethod] 117 [TestCategory("Problems.DataAnalysis")] 118 [TestProperty("Time", "short")] 124 119 public void SymbolicDataAnalysisExpressionTreeInterpreterEvaluateTest() { 125 120 Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] { … … 144 139 } 145 140 146 //[TestMethod]147 //public void SymbolicDataAnalysisExpressionILEmittingTreeInterpreterEvaluateTest() {148 // Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {149 // { 1.0, 1.0, 1.0 },150 // { 2.0, 2.0, 2.0 },151 // { 3.0, 1.0, 2.0 },152 // { 4.0, 1.0, 1.0 },153 // { 5.0, 2.0, 2.0 },154 // { 6.0, 1.0, 2.0 },155 // { 7.0, 1.0, 1.0 },156 // { 8.0, 2.0, 2.0 },157 // { 9.0, 1.0, 2.0 },158 // { 10.0, 1.0, 1.0 },159 // { 11.0, 2.0, 2.0 },160 // { 12.0, 1.0, 2.0 }161 // });162 163 // var interpreter = new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter();164 // EvaluateTerminals(interpreter, ds);165 // EvaluateOperations(interpreter, ds);166 //}167 168 141 private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) { 169 142 // constants -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/Util.cs
r9764 r9785 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 27 using HeuristicLab.Random; 28 28 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Tests { 29 30 internal class Util {
Note: See TracChangeset
for help on using the changeset viewer.