Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5747 for branches


Ignore:
Timestamp:
03/18/11 10:01:00 (14 years ago)
Author:
gkronber
Message:

#1418 renamed bounded evaluator, added base classes for single objective and multi objective validation analzers, added overfitting analyzers for symbolic regression and classification.

Location:
branches/DataAnalysis Refactoring
Files:
20 edited
3 copied
2 moved

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj

    r5717 r5747  
    110110    <Compile Include="Interfaces\ISymbolicDiscriminantFunctionClassificationModel.cs" />
    111111    <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" />
     112    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs" />
     113    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs" />
    112114    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer.cs" />
    113115    <Compile Include="SymbolicDiscriminantFunctionClassificationModel.cs" />
     
    119121    <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveProblem.cs" />
    120122    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveEvaluator.cs" />
    121     <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator.cs" />
    122123    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs" />
    123124    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs" />
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5722 r5747  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5722 r5747  
    55using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    66using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     7using System;
    78
    89namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    3334      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    3435      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
    35       double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues);
    36       return new double[2] { r2, solution.Length };
     36      try {
     37        double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues);
     38        return new double[2] { r2, solution.Length };
     39      }
     40      catch (ArgumentException) {
     41        // if R² cannot be calcualted because of infinity or NaN values => return worst possible fitness value
     42        return new double[2] { 0.0, solution.Length };
     43      }
    3744    }
    3845
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5736 r5747  
    3838  [StorableClass]
    3939  public sealed class SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<ISymbolicClassificationSolution>,
    40     ISymbolicDataAnalysisInterpreterOperator {
     40    ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator {
    4141    private const string ProblemDataParameterName = "ProblemData";
    4242    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r5735 r5747  
    3232  [Item("Bounded Mean squared error Evaluator", "Calculates the bounded mean squared error of a symbolic classification solution (estimations above or below the class values are only penaltilized linearly.")]
    3333  [StorableClass]
    34   public class SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator : SymbolicClassificationSingleObjectiveEvaluator {
     34  public class SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator : SymbolicClassificationSingleObjectiveEvaluator {
    3535
    3636    [StorableConstructor]
    37     protected SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { }
    38     protected SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator(SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator original, Cloner cloner) : base(original, cloner) { }
     37    protected SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { }
     38    protected SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator(SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator original, Cloner cloner) : base(original, cloner) { }
    3939    public override IDeepCloneable Clone(Cloner cloner) {
    40       return new SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator(this, cloner);
     40      return new SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator(this, cloner);
    4141    }
    4242
    43     public SymbolicClassificationSingleObjectiveBoundeMeanSquaredErrorEvaluator() : base() { }
     43    public SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator() : base() { }
    4444
    4545    public override bool Maximization { get { return false; } }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5722 r5747  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    6263      LowerEstimationLimitParameter.ExecutionContext = context;
    6364      UpperEstimationLimitParameter.ExecutionContext = context;
    64      
     65
    6566      double mse = Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
    6667
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs

    r5735 r5747  
    3131using HeuristicLab.Parameters;
    3232using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.Problems.DataAnalysis.Evaluators;
    3433using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3534using System;
    3635
    37 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
    38   [Item("SymbolicRegressionOverfittingAnalyzer", "Calculates and tracks correlation of training and validation fitness of symbolic regression models.")]
     36namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     37  [Item("SymbolicClassificationSingleObjectiveOverfittingAnalyzer", "Calculates and tracks correlation of training and validation fitness of symbolic classification models.")]
    3938  [StorableClass]
    40   public sealed class SymbolicRegressionOverfittingAnalyzer : SymbolicRegressionValidationAnalyzer, ISymbolicRegressionAnalyzer {
    41     private const string MaximizationParameterName = "Maximization";
    42     private const string QualityParameterName = "Quality";
    43     private const string TrainingValidationCorrelationParameterName = "TrainingValidationCorrelation";
    44     private const string TrainingValidationCorrelationTableParameterName = "TrainingValidationCorrelationTable";
     39  public sealed class SymbolicClassificationSingleObjectiveOverfittingAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<ISymbolicClassificationSingleObjectiveEvaluator, IClassificationProblemData> {
     40    private const string TrainingValidationCorrelationParameterName = "Training and validation fitness correlation";
     41    private const string TrainingValidationCorrelationTableParameterName = "Training and validation fitness correlation table";
    4542    private const string LowerCorrelationThresholdParameterName = "LowerCorrelationThreshold";
    4643    private const string UpperCorrelationThresholdParameterName = "UpperCorrelationThreshold";
    4744    private const string OverfittingParameterName = "IsOverfitting";
    48     private const string ResultsParameterName = "Results";
    4945
    5046    #region parameter properties
    51     public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
    52       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
    53     }
    54     public ILookupParameter<BoolValue> MaximizationParameter {
    55       get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
    56     }
    5747    public ILookupParameter<DoubleValue> TrainingValidationQualityCorrelationParameter {
    5848      get { return (ILookupParameter<DoubleValue>)Parameters[TrainingValidationCorrelationParameterName]; }
     
    7060      get { return (ILookupParameter<BoolValue>)Parameters[OverfittingParameterName]; }
    7161    }
    72     public ILookupParameter<ResultCollection> ResultsParameter {
    73       get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
    74     }
    75     #endregion
    76     #region properties
    77     public BoolValue Maximization {
    78       get { return MaximizationParameter.ActualValue; }
    79     }
    8062    #endregion
    8163
    8264    [StorableConstructor]
    83     private SymbolicRegressionOverfittingAnalyzer(bool deserializing) : base(deserializing) { }
    84     private SymbolicRegressionOverfittingAnalyzer(SymbolicRegressionOverfittingAnalyzer original, Cloner cloner) : base(original, cloner) { }
    85     public SymbolicRegressionOverfittingAnalyzer()
     65    private SymbolicClassificationSingleObjectiveOverfittingAnalyzer(bool deserializing) : base(deserializing) { }
     66    private SymbolicClassificationSingleObjectiveOverfittingAnalyzer(SymbolicClassificationSingleObjectiveOverfittingAnalyzer original, Cloner cloner) : base(original, cloner) { }
     67    public SymbolicClassificationSingleObjectiveOverfittingAnalyzer()
    8668      : base() {
    87       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "Training fitness"));
    88       Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
    8969      Parameters.Add(new LookupParameter<DoubleValue>(TrainingValidationCorrelationParameterName, "Correlation of training and validation fitnesses"));
    9070      Parameters.Add(new LookupParameter<DataTable>(TrainingValidationCorrelationTableParameterName, "Data table of training and validation fitness correlation values over the whole run."));
     
    9272      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperCorrelationThresholdParameterName, "Upper threshold for correlation value that marks the boundary from overfitting to non-overfitting.", new DoubleValue(0.75)));
    9373      Parameters.Add(new LookupParameter<BoolValue>(OverfittingParameterName, "Boolean indicator for overfitting."));
    94       Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection."));
    95     }
    96 
    97     [StorableHook(HookType.AfterDeserialization)]
    98     private void AfterDeserialization() {
    9974    }
    10075
    10176    public override IDeepCloneable Clone(Cloner cloner) {
    102       return new SymbolicRegressionOverfittingAnalyzer(this, cloner);
     77      return new SymbolicClassificationSingleObjectiveOverfittingAnalyzer(this, cloner);
    10378    }
    10479
    105     protected override void Analyze(SymbolicExpressionTree[] trees, double[] validationQuality) {
     80    public override IOperation Apply() {
    10681      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
    107 
     82      // evaluate on validation partition
     83      int start = ValidationSamplesStart.Value;
     84      int end = ValidationSamplesEnd.Value;
     85      var rows = Enumerable.Range(start, end - start);
     86      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(Evaluator);
     87      double[] validationQuality = (from tree in SymbolicExpressionTrees
     88                                    select Evaluator.Evaluate(childContext, tree, ProblemData, rows))
     89                                   .ToArray();
    10890      double r = alglib.spearmancorr2(trainingQuality, validationQuality);
    10991
     
    11193
    11294      if (TrainingValidationQualityCorrelationTableParameter.ActualValue == null) {
    113         var dataTable = new DataTable("Training and validation fitness correlation table", "Data table of training and validation fitness correlation values over the whole run.");
    114         dataTable.Rows.Add(new DataRow("Training and validation fitness correlation", "Training and validation fitness correlation values"));
     95        var dataTable = new DataTable(TrainingValidationQualityCorrelationTableParameter.Name, TrainingValidationQualityCorrelationTableParameter.Description);
     96        dataTable.Rows.Add(new DataRow(TrainingValidationQualityCorrelationParameter.Name, TrainingValidationQualityCorrelationParameter.Description));
    11597        TrainingValidationQualityCorrelationTableParameter.ActualValue = dataTable;
    116         ResultsParameter.ActualValue.Add(new Result(TrainingValidationCorrelationTableParameterName, dataTable));
     98        ResultCollectionParameter.ActualValue.Add(new Result(TrainingValidationQualityCorrelationTableParameter.Name, dataTable));
    11799      }
    118100
    119       TrainingValidationQualityCorrelationTableParameter.ActualValue.Rows["Training and validation fitness correlation"].Values.Add(r);
     101      TrainingValidationQualityCorrelationTableParameter.ActualValue.Rows[TrainingValidationQualityCorrelationParameter.Name].Values.Add(r);
    120102
    121103      if (OverfittingParameter.ActualValue != null && OverfittingParameter.ActualValue.Value) {
     
    128110        OverfittingParameter.ActualValue = new BoolValue(r < LowerCorrelationThresholdParameter.ActualValue.Value);
    129111      }
     112
     113      return base.Apply();
    130114    }
    131115  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r5722 r5747  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    5455      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5556      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
    56       return OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues);
     57      try {
     58        return OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues);
     59      }
     60      catch (ArgumentException) {
     61        // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness valuse
     62        return 0.0;
     63      }
    5764    }
    5865
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r5733 r5747  
    7676      Operators.Add(new SymbolicClassificationSingleObjectiveTrainingBestSolutionAnalyzer());
    7777      Operators.Add(new SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer());
     78      Operators.Add(new SymbolicClassificationSingleObjectiveOverfittingAnalyzer());
    7879      ParameterizeOperators();
    7980    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r5733 r5747  
    109109  <ItemGroup>
    110110    <Compile Include="MultiObjective\SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs" />
     111    <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs" />
    111112    <Compile Include="SymbolicRegressionModel.cs" />
    112113    <Compile Include="Interfaces\ISymbolicRegressionModel.cs" />
     
    134135  </ItemGroup>
    135136  <ItemGroup>
     137    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
     138      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
     139      <Name>HeuristicLab.Analysis-3.3</Name>
     140    </ProjectReference>
    136141    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    137142      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
     
    157162      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
    158163      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
     164    </ProjectReference>
     165    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
     166      <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
     167      <Name>ALGLIB-3.1.0</Name>
     168    </ProjectReference>
     169    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0.csproj">
     170      <Project>{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}</Project>
     171      <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name>
    159172    </ProjectReference>
    160173    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3.csproj">
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5722 r5747  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5722 r5747  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    5455      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5556      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
    56       double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues);
    57       return new double[2] { r2, solution.Length };
     57      try {
     58        double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues);
     59        return new double[2] { r2, solution.Length };
     60      }
     61      catch (ArgumentException) {
     62        // if R² cannot be calcualted return worst possible fitness value
     63        return new double[2] { 0.0, solution.Length };
     64      }
    5865    }
    5966
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5729 r5747  
    3838  [StorableClass]
    3939  public sealed class SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<ISymbolicRegressionSolution>,
    40     ISymbolicDataAnalysisInterpreterOperator {
     40    ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator {
    4141    private const string ProblemDataParameterName = "ProblemData";
    4242    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5722 r5747  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using System;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs

    r5735 r5747  
    3131using HeuristicLab.Parameters;
    3232using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.Problems.DataAnalysis.Evaluators;
    3433using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3534using System;
    3635
    37 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
    38   [Item("SymbolicRegressionOverfittingAnalyzer", "Calculates and tracks correlation of training and validation fitness of symbolic regression models.")]
     36namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     37  [Item("SymbolicRegressionSingleObjectiveOverfittingAnalyzer", "Calculates and tracks correlation of training and validation fitness of symbolic regression models.")]
    3938  [StorableClass]
    40   public sealed class SymbolicRegressionOverfittingAnalyzer : SymbolicRegressionValidationAnalyzer, ISymbolicRegressionAnalyzer {
    41     private const string MaximizationParameterName = "Maximization";
    42     private const string QualityParameterName = "Quality";
    43     private const string TrainingValidationCorrelationParameterName = "TrainingValidationCorrelation";
    44     private const string TrainingValidationCorrelationTableParameterName = "TrainingValidationCorrelationTable";
     39  public sealed class SymbolicRegressionSingleObjectiveOverfittingAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<ISymbolicRegressionSingleObjectiveEvaluator, IRegressionProblemData> {
     40    private const string TrainingValidationCorrelationParameterName = "Training and validation fitness correlation";
     41    private const string TrainingValidationCorrelationTableParameterName = "Training and validation fitness correlation table";
    4542    private const string LowerCorrelationThresholdParameterName = "LowerCorrelationThreshold";
    4643    private const string UpperCorrelationThresholdParameterName = "UpperCorrelationThreshold";
    4744    private const string OverfittingParameterName = "IsOverfitting";
    48     private const string ResultsParameterName = "Results";
    4945
    5046    #region parameter properties
    51     public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
    52       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
    53     }
    54     public ILookupParameter<BoolValue> MaximizationParameter {
    55       get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
    56     }
    5747    public ILookupParameter<DoubleValue> TrainingValidationQualityCorrelationParameter {
    5848      get { return (ILookupParameter<DoubleValue>)Parameters[TrainingValidationCorrelationParameterName]; }
     
    7060      get { return (ILookupParameter<BoolValue>)Parameters[OverfittingParameterName]; }
    7161    }
    72     public ILookupParameter<ResultCollection> ResultsParameter {
    73       get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
    74     }
    75     #endregion
    76     #region properties
    77     public BoolValue Maximization {
    78       get { return MaximizationParameter.ActualValue; }
    79     }
    8062    #endregion
    8163
    8264    [StorableConstructor]
    83     private SymbolicRegressionOverfittingAnalyzer(bool deserializing) : base(deserializing) { }
    84     private SymbolicRegressionOverfittingAnalyzer(SymbolicRegressionOverfittingAnalyzer original, Cloner cloner) : base(original, cloner) { }
    85     public SymbolicRegressionOverfittingAnalyzer()
     65    private SymbolicRegressionSingleObjectiveOverfittingAnalyzer(bool deserializing) : base(deserializing) { }
     66    private SymbolicRegressionSingleObjectiveOverfittingAnalyzer(SymbolicRegressionSingleObjectiveOverfittingAnalyzer original, Cloner cloner) : base(original, cloner) { }
     67    public SymbolicRegressionSingleObjectiveOverfittingAnalyzer()
    8668      : base() {
    87       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "Training fitness"));
    88       Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
    8969      Parameters.Add(new LookupParameter<DoubleValue>(TrainingValidationCorrelationParameterName, "Correlation of training and validation fitnesses"));
    9070      Parameters.Add(new LookupParameter<DataTable>(TrainingValidationCorrelationTableParameterName, "Data table of training and validation fitness correlation values over the whole run."));
     
    9272      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperCorrelationThresholdParameterName, "Upper threshold for correlation value that marks the boundary from overfitting to non-overfitting.", new DoubleValue(0.75)));
    9373      Parameters.Add(new LookupParameter<BoolValue>(OverfittingParameterName, "Boolean indicator for overfitting."));
    94       Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection."));
    95     }
    96 
    97     [StorableHook(HookType.AfterDeserialization)]
    98     private void AfterDeserialization() {
    9974    }
    10075
    10176    public override IDeepCloneable Clone(Cloner cloner) {
    102       return new SymbolicRegressionOverfittingAnalyzer(this, cloner);
     77      return new SymbolicRegressionSingleObjectiveOverfittingAnalyzer(this, cloner);
    10378    }
    10479
    105     protected override void Analyze(SymbolicExpressionTree[] trees, double[] validationQuality) {
     80    public override IOperation Apply() {
    10681      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
    107 
     82      // evaluate on validation partition
     83      int start = ValidationSamplesStart.Value;
     84      int end = ValidationSamplesEnd.Value;
     85      var rows = Enumerable.Range(start, end - start);
     86      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(Evaluator);
     87      double[] validationQuality = (from tree in SymbolicExpressionTrees
     88                                    select Evaluator.Evaluate(childContext, tree, ProblemData, rows))
     89                                   .ToArray();
    10890      double r = alglib.spearmancorr2(trainingQuality, validationQuality);
    10991
     
    11193
    11294      if (TrainingValidationQualityCorrelationTableParameter.ActualValue == null) {
    113         var dataTable = new DataTable("Training and validation fitness correlation table", "Data table of training and validation fitness correlation values over the whole run.");
    114         dataTable.Rows.Add(new DataRow("Training and validation fitness correlation", "Training and validation fitness correlation values"));
     95        var dataTable = new DataTable(TrainingValidationQualityCorrelationTableParameter.Name, TrainingValidationQualityCorrelationTableParameter.Description);
     96        dataTable.Rows.Add(new DataRow(TrainingValidationQualityCorrelationParameter.Name, TrainingValidationQualityCorrelationParameter.Description));
    11597        TrainingValidationQualityCorrelationTableParameter.ActualValue = dataTable;
    116         ResultsParameter.ActualValue.Add(new Result(TrainingValidationCorrelationTableParameterName, dataTable));
     98        ResultCollectionParameter.ActualValue.Add(new Result(TrainingValidationQualityCorrelationTableParameter.Name, dataTable));
    11799      }
    118100
    119       TrainingValidationQualityCorrelationTableParameter.ActualValue.Rows["Training and validation fitness correlation"].Values.Add(r);
     101      TrainingValidationQualityCorrelationTableParameter.ActualValue.Rows[TrainingValidationQualityCorrelationParameter.Name].Values.Add(r);
    120102
    121103      if (OverfittingParameter.ActualValue != null && OverfittingParameter.ActualValue.Value) {
     
    128110        OverfittingParameter.ActualValue = new BoolValue(r < LowerCorrelationThresholdParameter.ActualValue.Value);
    129111      }
     112
     113      return base.Apply();
    130114    }
    131115  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs

    r5742 r5747  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828using System.Linq;
     29using System;
    2930
    3031namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    5556      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    5657      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
    57       return OnlinePearsonsRSquaredEvaluator.Calculate(estimatedValues, originalValues);
     58      try {
     59        return OnlinePearsonsRSquaredEvaluator.Calculate(estimatedValues, originalValues);
     60      }
     61      catch (ArgumentException) {
     62        // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness valuse
     63        return 0.0;
     64      }
    5865    }
    5966
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r5733 r5747  
    7878      Operators.Add(new SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer());
    7979      Operators.Add(new SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer());
     80      Operators.Add(new SymbolicRegressionSingleObjectiveOverfittingAnalyzer());
    8081      ParameterizeOperators();
    8182    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r5729 r5747  
    3838  [StorableClass]
    3939  public sealed class SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<ISymbolicRegressionSolution>,
    40   ISymbolicDataAnalysisInterpreterOperator {
     40  ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator {
    4141    private const string ProblemDataParameterName = "ProblemData";
    4242    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r5742 r5747  
    4242    private const string TrainingBestSolutionsParameterName = "Best training solutions";
    4343    private const string TrainingBestSolutionQualitiesParameterName = "Best training solution qualities";
    44     private const string TrainingBestSolutionsResultName = TrainingBestSolutionsParameterName;
    45     private const string TrainingBestSolutionQualitiesResultName = TrainingBestSolutionQualitiesParameterName;
    4644
    4745    #region parameter properties
     
    7977        TrainingBestSolutions = new ItemList<T>();
    8078        TrainingBestSolutionQualities = new ItemList<DoubleArray>();
    81         results.Add(new Result(TrainingBestSolutionQualitiesResultName, TrainingBestSolutionQualities));
    82         results.Add(new Result(TrainingBestSolutionsResultName, TrainingBestSolutions));
     79        results.Add(new Result(TrainingBestSolutionQualitiesParameter.Name, TrainingBestSolutionQualitiesParameter.Description, TrainingBestSolutionQualities));
     80        results.Add(new Result(TrainingBestSolutionsParameter.Name, TrainingBestSolutionsParameter.Description, TrainingBestSolutions));
    8381      }
    8482
     
    123121        }
    124122
    125         results[TrainingBestSolutionsResultName].Value = nonDominatedSolutions;
    126         results[TrainingBestSolutionQualitiesResultName].Value = nonDominatedQualities;
     123        results[TrainingBestSolutionsParameter.Name].Value = nonDominatedSolutions;
     124        results[TrainingBestSolutionQualitiesParameter.Name].Value = nonDominatedQualities;
    127125      }
    128126      #endregion
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs

    r5735 r5747  
    3636  /// </summary>
    3737  [StorableClass]
    38   public abstract class SymbolicDataAnalysisValidationAnalyzer<T, U> : SymbolicDataAnalysisAnalyzer,
     38  public abstract class SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisMultiObjectiveAnalyzer,
    3939    ISymbolicDataAnalysisValidationAnalyzer<T, U>
    40     where T : class, ISymbolicDataAnalysisEvaluator<U>
     40    where T : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<U>
    4141    where U : class, IDataAnalysisProblemData {
    4242    private const string ProblemDataParameterName = "ProblemData";
     
    7373
    7474    [StorableConstructor]
    75     protected SymbolicDataAnalysisValidationAnalyzer(bool deserializing) : base(deserializing) { }
    76     protected SymbolicDataAnalysisValidationAnalyzer(SymbolicDataAnalysisValidationAnalyzer<T, U> original, Cloner cloner)
     75    protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(bool deserializing) : base(deserializing) { }
     76    protected SymbolicDataAnalysisMultiObjectiveValidationAnalyzer(SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U> original, Cloner cloner)
    7777      : base(original, cloner) {
    7878    }
    79     public SymbolicDataAnalysisValidationAnalyzer()
     79    public SymbolicDataAnalysisMultiObjectiveValidationAnalyzer()
    8080      : base() {
    8181      Parameters.Add(new LookupParameter<U>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs

    r5742 r5747  
    3838  [Item("SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic data analysis solution for multi objective symbolic data analysis problems.")]
    3939  [StorableClass]
    40   public abstract class SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisValidationAnalyzer<T, U>,
     40  public abstract class SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisMultiObjectiveValidationAnalyzer<T, U>,
    4141    ISymbolicDataAnalysisMultiObjectiveAnalyzer
    4242    where S : class, ISymbolicDataAnalysisSolution
    4343    where T : class, ISymbolicDataAnalysisMultiObjectiveEvaluator<U>
    4444    where U : class, IDataAnalysisProblemData {
    45     private const string QualitiesParameterName = "Qualities";
    46     private const string MaximizationParameterName = "Maximization";
    4745    private const string ValidationBestSolutionsParameterName = "Best validation solutions";
    4846    private const string ValidationBestSolutionQualitiesParameterName = "Best validation solution qualities";
    49     private const string ValidationBestSolutionsResultName = ValidationBestSolutionsParameterName;
    50     private const string ValidationBestSolutionQualitiesResultName = ValidationBestSolutionQualitiesParameterName;
    5147
    5248    #region parameter properties
    53     public IScopeTreeLookupParameter<DoubleArray> QualitiesParameter {
    54       get { return (IScopeTreeLookupParameter<DoubleArray>)Parameters[QualitiesParameterName]; }
    55     }
    56     public ILookupParameter<BoolArray> MaximizationParameter {
    57       get { return (ILookupParameter<BoolArray>)Parameters[MaximizationParameterName]; }
    58     }
    5949    public ILookupParameter<ItemList<S>> ValidationBestSolutionsParameter {
    6050      get { return (ILookupParameter<ItemList<S>>)Parameters[ValidationBestSolutionsParameterName]; }
     
    6555    #endregion
    6656    #region properties
    67     public ItemArray<DoubleArray> Qualities {
    68       get { return QualitiesParameter.ActualValue; }
    69     }
    70     public BoolArray Maximization {
    71       get { return MaximizationParameter.ActualValue; }
    72     }
    7357    public ItemList<S> ValidationBestSolutions {
    7458      get { return ValidationBestSolutionsParameter.ActualValue; }
     
    8670    public SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer()
    8771      : base() {
    88       Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(QualitiesParameterName, "The qualities of the trees that should be analyzed."));
    89       Parameters.Add(new LookupParameter<BoolArray>(MaximizationParameterName, "The directions of optimization for each dimension."));
    9072      Parameters.Add(new LookupParameter<ItemList<S>>(ValidationBestSolutionsParameterName, "The validation best (Pareto-optimal) symbolic data analysis solutions."));
    9173      Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(ValidationBestSolutionQualitiesParameterName, "The qualities of the validation best (Pareto-optimal) solutions."));
     
    9880        ValidationBestSolutions = new ItemList<S>();
    9981        ValidationBestSolutionQualities = new ItemList<DoubleArray>();
    100         results.Add(new Result(ValidationBestSolutionQualitiesResultName, ValidationBestSolutionQualities));
    101         results.Add(new Result(ValidationBestSolutionsResultName, ValidationBestSolutions));
     82        results.Add(new Result(ValidationBestSolutionQualitiesParameter.Name, ValidationBestSolutionQualitiesParameter.Description, ValidationBestSolutionQualities));
     83        results.Add(new Result(ValidationBestSolutionsParameter.Name, ValidationBestSolutionsParameter.Description, ValidationBestSolutions));
    10284      }
    10385
     
    148130        }
    149131
    150         results[ValidationBestSolutionsResultName].Value = nonDominatedSolutions;
    151         results[ValidationBestSolutionQualitiesResultName].Value = nonDominatedQualities;
     132        results[ValidationBestSolutionsParameter.Name].Value = nonDominatedSolutions;
     133        results[ValidationBestSolutionQualitiesParameter.Name].Value = nonDominatedQualities;
    152134      }
    153135      #endregion
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs

    r5607 r5747  
    4141    private const string TrainingBestSolutionParameterName = "Best training solution";
    4242    private const string TrainingBestSolutionQualityParameterName = "Best training solution quality";
    43     private const string TrainingBestSolutionResultName = TrainingBestSolutionParameterName;
    44     private const string TrainingBestSolutionQualityResultName = TrainingBestSolutionQualityParameterName;
    4543
    4644    #region parameter properties
     
    9290        TrainingBestSolutionQuality = new DoubleValue(bestQuality);
    9391
    94         if (!results.ContainsKey(TrainingBestSolutionParameterName)) {
    95           results.Add(new Result(TrainingBestSolutionResultName, TrainingBestSolution));
    96           results.Add(new Result(TrainingBestSolutionQualityResultName, TrainingBestSolutionQuality));
     92        if (!results.ContainsKey(TrainingBestSolutionParameter.Name)) {
     93          results.Add(new Result(TrainingBestSolutionParameter.Name, TrainingBestSolutionParameter.Description, TrainingBestSolution));
     94          results.Add(new Result(TrainingBestSolutionQualityParameter.Name, TrainingBestSolutionQualityParameter.Description, TrainingBestSolutionQuality));
    9795        } else {
    98           results[TrainingBestSolutionResultName].Value = TrainingBestSolution;
    99           results[TrainingBestSolutionQualityResultName].Value = TrainingBestSolutionQuality;
     96          results[TrainingBestSolutionParameter.Name].Value = TrainingBestSolution;
     97          results[TrainingBestSolutionQualityParameter.Name].Value = TrainingBestSolutionQuality;
    10098        }
    10199      }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs

    r5735 r5747  
    3636  /// </summary>
    3737  [StorableClass]
    38   public abstract class SymbolicDataAnalysisValidationAnalyzer<T, U> : SymbolicDataAnalysisAnalyzer,
     38  public abstract class SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisSingleObjectiveAnalyzer,
    3939    ISymbolicDataAnalysisValidationAnalyzer<T, U>
    40     where T : class, ISymbolicDataAnalysisEvaluator<U>
     40    where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
    4141    where U : class, IDataAnalysisProblemData {
    4242    private const string ProblemDataParameterName = "ProblemData";
     
    7373
    7474    [StorableConstructor]
    75     protected SymbolicDataAnalysisValidationAnalyzer(bool deserializing) : base(deserializing) { }
    76     protected SymbolicDataAnalysisValidationAnalyzer(SymbolicDataAnalysisValidationAnalyzer<T, U> original, Cloner cloner)
     75    protected SymbolicDataAnalysisSingleObjectiveValidationAnalyzer(bool deserializing) : base(deserializing) { }
     76    protected SymbolicDataAnalysisSingleObjectiveValidationAnalyzer(SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> original, Cloner cloner)
    7777      : base(original, cloner) {
    7878    }
    79     public SymbolicDataAnalysisValidationAnalyzer()
     79    public SymbolicDataAnalysisSingleObjectiveValidationAnalyzer()
    8080      : base() {
    8181      Parameters.Add(new LookupParameter<U>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs

    r5722 r5747  
    3737  [Item("SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic data analysis solution for single objective symbolic data analysis problems.")]
    3838  [StorableClass]
    39   public abstract class SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisValidationAnalyzer<T, U>,
    40     ISymbolicDataAnalysisSingleObjectiveAnalyzer
     39  public abstract class SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>
    4140    where S : class, ISymbolicDataAnalysisSolution
    4241    where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
    4342    where U : class, IDataAnalysisProblemData {
    44     private const string QualityParameterName = "Quality";
    45     private const string MaximizationParameterName = "Maximization";
    4643    private const string ValidationBestSolutionParameterName = "Best validation solution";
    4744    private const string ValidationBestSolutionQualityParameterName = "Best validation solution quality";
    48     private const string ValidationBestSolutionResultName = ValidationBestSolutionParameterName;
    49     private const string ValidationBestSolutionQualityResultName = ValidationBestSolutionQualityParameterName;
    5045
    5146    #region parameter properties
    52     public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
    53       get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
    54     }
    55     public ILookupParameter<BoolValue> MaximizationParameter {
    56       get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
    57     }
    5847    public ILookupParameter<S> ValidationBestSolutionParameter {
    5948      get { return (ILookupParameter<S>)Parameters[ValidationBestSolutionParameterName]; }
     
    6453    #endregion
    6554    #region properties
    66     public ItemArray<DoubleValue> Quality {
    67       get { return QualityParameter.ActualValue; }
    68     }
    69     public BoolValue Maximization {
    70       get { return MaximizationParameter.ActualValue; }
    71     }
    7255    public S ValidationBestSolution {
    7356      get { return ValidationBestSolutionParameter.ActualValue; }
     
    8568    public SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer()
    8669      : base() {
    87       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The qualities of the trees that should be analyzed."));
    88       Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
    8970      Parameters.Add(new LookupParameter<S>(ValidationBestSolutionParameterName, "The validation best symbolic data analyis solution."));
    9071      Parameters.Add(new LookupParameter<DoubleValue>(ValidationBestSolutionQualityParameterName, "The quality of the validation best symbolic data analysis solution."));
     
    11798        ValidationBestSolutionQuality = new DoubleValue(bestQuality);
    11899
    119         if (!results.ContainsKey(ValidationBestSolutionParameterName)) {
    120           results.Add(new Result(ValidationBestSolutionResultName, ValidationBestSolution));
    121           results.Add(new Result(ValidationBestSolutionQualityResultName, ValidationBestSolutionQuality));
     100        if (!results.ContainsKey(ValidationBestSolutionParameter.Name)) {
     101          results.Add(new Result(ValidationBestSolutionParameter.Name, ValidationBestSolutionParameter.Description, ValidationBestSolution));
     102          results.Add(new Result(ValidationBestSolutionQualityParameter.Name, ValidationBestSolutionQualityParameter.Description, ValidationBestSolutionQuality));
    122103        } else {
    123           results[ValidationBestSolutionResultName].Value = ValidationBestSolution;
    124           results[ValidationBestSolutionQualityResultName].Value = ValidationBestSolutionQuality;
     104          results[ValidationBestSolutionParameter.Name].Value = ValidationBestSolution;
     105          results[ValidationBestSolutionQualityParameter.Name].Value = ValidationBestSolutionQuality;
    125106        }
    126107      }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r5745 r5747  
    108108  </ItemGroup>
    109109  <ItemGroup>
     110    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs" />
    110111    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs" />
     112    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs" />
    111113    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs" />
    112     <Compile Include="Analyzers\SymbolicDataAnalysisValidationAnalyzer.cs" />
    113114    <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveAnalyzer.cs" />
    114115    <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveAnalyzer.cs" />
Note: See TracChangeset for help on using the changeset viewer.