Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9785


Ignore:
Timestamp:
07/26/13 14:11:33 (11 years ago)
Author:
abeham
Message:

#2088: Added test attributes for Problems.DataAnalysis

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  
    2323using System.Diagnostics;
    2424using System.Linq;
    25 using HeuristicLab.Problems.DataAnalysis;
    2625using HeuristicLab.Random;
    2726using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    3534
    3635    private TestContext testContextInstance;
    37 
    3836    /// <summary>
    3937    ///Gets or sets the test context which provides
     
    4745
    4846    [TestMethod]
     47    [TestCategory("Problems.DataAnalysis")]
     48    [TestProperty("Time", "medium")]
    4949    public void OnlineAccuracyCalculatorPerformanceTest() {
    5050      TestCalculatorPerfomance(OnlineAccuracyCalculator.Calculate);
    5151    }
    5252    [TestMethod]
     53    [TestCategory("Problems.DataAnalysis")]
     54    [TestProperty("Time", "medium")]
    5355    public void OnlineCovarianceCalculatorPerformanceTest() {
    5456      TestCalculatorPerfomance(OnlineCovarianceCalculator.Calculate);
    5557    }
    5658    [TestMethod]
     59    [TestCategory("Problems.DataAnalysis")]
     60    [TestProperty("Time", "medium")]
    5761    public void OnlineMeanAbsolutePercentageErrorCalculatorPerformanceTest() {
    5862      TestCalculatorPerfomance(OnlineMeanAbsolutePercentageErrorCalculator.Calculate);
     
    6064
    6165    [TestMethod]
     66    [TestCategory("Problems.DataAnalysis")]
     67    [TestProperty("Time", "medium")]
    6268    public void OnlineMeanSquaredErrorCalculatorPerformanceTest() {
    6369      TestCalculatorPerfomance(OnlineMeanSquaredErrorCalculator.Calculate);
    6470    }
    6571    [TestMethod]
     72    [TestCategory("Problems.DataAnalysis")]
     73    [TestProperty("Time", "medium")]
    6674    public void OnlineNormalizedMeanSquaredErrorCalculatorPerformanceTest() {
    6775      TestCalculatorPerfomance(OnlineNormalizedMeanSquaredErrorCalculator.Calculate);
    6876    }
    6977    [TestMethod]
     78    [TestCategory("Problems.DataAnalysis")]
     79    [TestProperty("Time", "medium")]
    7080    public void OnlinePearsonsRSquaredCalculatorPerformanceTest() {
    7181      TestCalculatorPerfomance(OnlinePearsonsRSquaredCalculator.Calculate);
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/StatisticCalculatorsTest.cs

    r9764 r9785  
    2323using System.Linq;
    2424using HeuristicLab.Common;
    25 using HeuristicLab.Problems.DataAnalysis;
    2625using Microsoft.VisualStudio.TestTools.UnitTesting;
    2726namespace HeuristicLab.Problems.DataAnalysis.Tests {
     
    5453
    5554    [TestMethod]
     55    [TestCategory("Problems.DataAnalysis")]
     56    [TestProperty("Time", "short")]
    5657    public void CalculateMeanAndVarianceTest() {
    5758      System.Random random = new System.Random(31415);
     
    8586
    8687    [TestMethod]
     88    [TestCategory("Problems.DataAnalysis")]
     89    [TestProperty("Time", "short")]
    8790    public void CalculatePearsonsRSquaredTest() {
    8891      System.Random random = new System.Random(31415);
     
    114117      }
    115118    }
    116     [TestMethod]
     119
     120    [TestMethod]
     121    [TestCategory("Problems.DataAnalysis")]
     122    [TestProperty("Time", "short")]
    117123    public void CalculatePearsonsRSquaredOfConstantTest() {
    118124      System.Random random = new System.Random(31415);
     
    141147
    142148    [TestMethod]
     149    [TestCategory("Problems.DataAnalysis")]
     150    [TestProperty("Time", "short")]
    143151    public void CalculateHoeffdingsDTest() {
    144152      OnlineCalculatorError error;
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ThresholdCalculatorsTest.cs

    r9764 r9785  
    2020#endregion
    2121
    22 using HeuristicLab.Problems.DataAnalysis;
    2322using Microsoft.VisualStudio.TestTools.UnitTesting;
     23
    2424namespace HeuristicLab.Problems.DataAnalysis.Tests {
    2525
     
    2727  public class ThresholdCalculatorsTest {
    2828    [TestMethod]
     29    [TestCategory("Problems.DataAnalysis")]
     30    [TestProperty("Time", "short")]
    2931    public void NormalDistributionCutPointsThresholdCalculatorTest() {
    3032
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionCrossoverTest.cs

    r9764 r9785  
    2727using HeuristicLab.Core;
    2828using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    29 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3029using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
    3130using HeuristicLab.Random;
     
    4948
    5049    [TestMethod]
     50    [TestCategory("Problems.DataAnalysis")]
     51    [TestProperty("Time", "long")]
    5152    public void SymbolicDataAnalysisExpressionSemanticSimilarityCrossoverPerformanceTest() {
    5253      var problem = new SymbolicRegressionSingleObjectiveProblem();
     
    5657
    5758    [TestMethod]
     59    [TestCategory("Problems.DataAnalysis")]
     60    [TestProperty("Time", "long")]
    5861    public void SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossoverPerformanceTest() {
    5962      var problem = new SymbolicRegressionSingleObjectiveProblem();
     
    6366
    6467    [TestMethod]
     68    [TestCategory("Problems.DataAnalysis")]
     69    [TestProperty("Time", "long")]
    6570    public void SymbolicDataAnalysisExpressionDeterministicBestCrossoverPerformanceTest() {
    6671      var problem = new SymbolicRegressionSingleObjectiveProblem();
     
    7075
    7176    [TestMethod]
     77    [TestCategory("Problems.DataAnalysis")]
     78    [TestProperty("Time", "long")]
    7279    public void SymbolicDataAnalysisExpressionContextAwareCrossoverPerformanceTest() {
    7380      var problem = new SymbolicRegressionSingleObjectiveProblem();
     
    7784
    7885    [TestMethod]
     86    [TestCategory("Problems.DataAnalysis")]
     87    [TestProperty("Time", "long")]
    7988    public void SymbolicDataAnalysisExpressionDepthConstrainedCrossoverPerformanceTest() {
    8089      var problem = new SymbolicRegressionSingleObjectiveProblem();
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs

    r9764 r9785  
    2525using System.Linq;
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    27 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    2827using HeuristicLab.Random;
    2928using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    5251
    5352    [TestMethod]
     53    [TestCategory("Problems.DataAnalysis")]
     54    [TestProperty("Time", "long")]
    5455    public void SymbolicDataAnalysisExpressionTreeInterpreterTypeCoherentGrammarPerformanceTest() {
    5556      TypeCoherentGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
    5657    }
    57     [TestMethod]
     58
     59    [TestMethod]
     60    [TestCategory("Problems.DataAnalysis")]
     61    [TestProperty("Time", "long")]
    5862    public void SymbolicDataAnalysisExpressionTreeInterpreterFullGrammarPerformanceTest() {
    5963      FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
    6064    }
    61     [TestMethod]
     65
     66    [TestMethod]
     67    [TestCategory("Problems.DataAnalysis")]
     68    [TestProperty("Time", "long")]
    6269    public void SymbolicDataAnalysisExpressionTreeInterpreterArithmeticGrammarPerformanceTest() {
    6370      ArithmeticGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
     
    6572
    6673    [TestMethod]
     74    [TestCategory("Problems.DataAnalysis")]
     75    [TestProperty("Time", "long")]
    6776    public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterTypeCoherentGrammarPerformanceTest() {
    6877      TypeCoherentGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6);
    6978    }
    70     [TestMethod]
     79
     80    [TestMethod]
     81    [TestCategory("Problems.DataAnalysis")]
     82    [TestProperty("Time", "long")]
    7183    public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterFullGrammarPerformanceTest() {
    7284      FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6);
    7385    }
     86
     87    [TestCategory("Problems.DataAnalysis")]
     88    [TestProperty("Time", "long")]
    7489    [TestMethod]
    7590    public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterArithmeticGrammarPerformanceTest() {
     
    135150    ///</summary>
    136151    [TestMethod]
     152    [TestCategory("Problems.DataAnalysis")]
     153    [TestProperty("Time", "short")]
    137154    public void SymbolicDataAnalysisExpressionTreeInterpreterEvaluateTest() {
    138155      Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
     
    158175
    159176    [TestMethod]
     177    [TestCategory("Problems.DataAnalysis")]
     178    [TestProperty("Time", "short")]
    160179    public void SymbolicDataAnalysisExpressionILEmittingTreeInterpreterEvaluateTest() {
    161180      Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
     
    411430          try {
    412431            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
    415433          }
    416434        };
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs

    r9764 r9785  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    25 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    2625using Microsoft.VisualStudio.TestTools.UnitTesting;
    2726
     
    3029  [TestClass()]
    3130  public class SymbolicDataAnalysisExpressionTreeSimplifierTest {
     31
    3232    [TestMethod]
     33    [TestCategory("Problems.DataAnalysis")]
     34    [TestProperty("Time", "short")]
    3335    public void SimplifierAxiomsTest() {
    3436      SymbolicExpressionImporter importer = new SymbolicExpressionImporter();
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionImporter.cs

    r9764 r9785  
    2525using System.Linq;
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    27 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    2827
    2928namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
     
    8685    StartSymbol startSymbol = new StartSymbol();
    8786
    88     public SymbolicExpressionImporter() {
    89     }
    90 
    9187    internal ISymbolicExpressionTree Import(string str) {
    9288      str = str.Replace("(", " ( ").Replace(")", " ) ");
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs

    r9764 r9785  
    2525using System.Linq;
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    27 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    2827using HeuristicLab.Random;
    2928namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs

    r9764 r9785  
    2525using System.Linq;
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    27 using HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis;
    2827using HeuristicLab.Problems.DataAnalysis.Symbolic.Tests;
    2928using HeuristicLab.Random;
     
    3635    private const int Rows = 100;
    3736    private const int Columns = 50;
    38     private TestContext testContextInstance;
    39 
    40     /// <summary>
    41     ///Gets or sets the test context which provides
    42     ///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     }
    5237
    5338    [TestMethod]
     39    [TestCategory("Problems.DataAnalysis")]
     40    [TestProperty("Time", "long")]
    5441    public void SymbolicTimeSeriesPrognosisTreeInterpreterTypeCoherentGrammarPerformanceTest() {
    5542      TypeCoherentGrammarPerformanceTest(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6);
    5643    }
     44
    5745    [TestMethod]
     46    [TestCategory("Problems.DataAnalysis")]
     47    [TestProperty("Time", "long")]
    5848    public void SymbolicTimeSeriesPrognosisTreeInterpreterFullGrammarPerformanceTest() {
    5949      FullGrammarPerformanceTest(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6);
    6050    }
     51
    6152    [TestMethod]
     53    [TestCategory("Problems.DataAnalysis")]
     54    [TestProperty("Time", "long")]
    6255    public void SymbolicTimeSeriesPrognosisTreeInterpreterArithmeticGrammarPerformanceTest() {
    6356      ArithmeticGrammarPerformanceTest(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6);
     
    122115    ///</summary>
    123116    [TestMethod]
     117    [TestCategory("Problems.DataAnalysis")]
     118    [TestProperty("Time", "short")]
    124119    public void SymbolicDataAnalysisExpressionTreeInterpreterEvaluateTest() {
    125120      Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
     
    144139    }
    145140
    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 
    168141    private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
    169142      // constants
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/Util.cs

    r9764 r9785  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Random;
     28
    2829namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Tests {
    2930  internal class Util {
Note: See TracChangeset for help on using the changeset viewer.