Free cookie consent management tool by TermsFeed Policy Generator

Changeset 18053


Ignore:
Timestamp:
09/14/21 09:37:29 (3 years ago)
Author:
gkronber
Message:

#3135 added a new analyzer which allows to configure the solution result name, and renamed and marked the existing SolutionRSquaredAnalyzer as obsolete.

Location:
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
Files:
1 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r17959 r18053  
    133133    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
    134134    <Compile Include="SingleObjective\ShapeConstrainedRegressionSingleObjectiveProblem.cs" />
    135     <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />
     135    <Compile Include="SingleObjective\SolutionQualityAnalyzer.cs" />
     136    <Compile Include="SingleObjective\SolutionRSquaredAnalyzer.cs" />
    136137    <Compile Include="SymbolicRegressionPhenotypicDiversityAnalyzer.cs" />
    137138    <Compile Include="SymbolicRegressionPruningAnalyzer.cs" />
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SolutionRSquaredAnalyzer.cs

    r18052 r18053  
    3131using HeuristicLab.Parameters;
    3232using HEAL.Attic;
     33using System;
    3334
    3435namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
    3536  [StorableType("789E0217-6DDC-44E8-85CC-A51A976A8FB8")]
    36   public class SymbolicRegressionSolutionsAnalyzer : SingleSuccessorOperator, IAnalyzer {
     37  [Obsolete("Use SolutionQualityAnalyzer instead")]
     38  public class SolutionRSquaredAnalyzer : SingleSuccessorOperator, IAnalyzer {
    3739    private const string ResultCollectionParameterName = "Results";
    3840    private const string RegressionSolutionQualitiesResultName = "Regression Solution Qualities";
     
    5557
    5658    [StorableConstructor]
    57     protected SymbolicRegressionSolutionsAnalyzer(StorableConstructorFlag _) : base(_) { }
    58     protected SymbolicRegressionSolutionsAnalyzer(SymbolicRegressionSolutionsAnalyzer original, Cloner cloner)
     59    protected SolutionRSquaredAnalyzer(StorableConstructorFlag _) : base(_) { }
     60    protected SolutionRSquaredAnalyzer(SolutionRSquaredAnalyzer original, Cloner cloner)
    5961      : base(original, cloner) { }
    6062    public override IDeepCloneable Clone(Cloner cloner) {
    61       return new SymbolicRegressionSolutionsAnalyzer(this, cloner);
     63      return new SolutionRSquaredAnalyzer(this, cloner);
    6264    }
    6365
    64     public SymbolicRegressionSolutionsAnalyzer() {
     66    public SolutionRSquaredAnalyzer() {
    6567      Parameters.Add(new LookupParameter<ResultCollection>(ResultCollectionParameterName, "The result collection to store the analysis results."));
    6668      Parameters.Add(new LookupParameter<DoubleValue>(TrainingQualityParameterName));
     
    9395      ILookupParameter<DoubleValue> trainingQualityParam = null;
    9496      ILookupParameter<DoubleValue> testQualityParam = null;
    95       // store actual names of parameter because it is changed below
     97      // store actual names of parameter because they are changed below
    9698      trainingQualityParam = TrainingQualityParameter;
    9799      string prevTrainingQualityParamName = trainingQualityParam.ActualName;
     
    113115
    114116        // also add training and test R² to the scope using the parameters
    115         // HACK: we change the ActualName of the parameter to write two variables for each solution in the results collection
     117        // HACK: we change the ActualName of the parameter to write training & test quality for each solution in the results collection
    116118        trainingQualityParam.ActualName = trainingR2Name;
    117119        trainingQualityParam.ActualValue = new DoubleValue(solution.TrainingRSquared);
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r17958 r18053  
    9090        changed = true;
    9191      }
    92       if (!Operators.OfType<SymbolicRegressionSolutionsAnalyzer>().Any()) {
    93         Operators.Add(new SymbolicRegressionSolutionsAnalyzer());
     92      if (!Operators.OfType<SolutionQualityAnalyzer>().Any()) {
     93        Operators.Add(new SolutionQualityAnalyzer());
    9494        changed = true;
    9595      }
     
    119119      Operators.Add(new SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer());
    120120      Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer());
    121       Operators.Add(new SymbolicRegressionSolutionsAnalyzer());
     121      Operators.Add(new SolutionQualityAnalyzer());
    122122      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
    123123      Operators.Add(new ShapeConstraintsAnalyzer());
Note: See TracChangeset for help on using the changeset viewer.