Changeset 18053
- Timestamp:
- 09/14/21 09:37:29 (3 years ago)
- 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 133 133 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" /> 134 134 <Compile Include="SingleObjective\ShapeConstrainedRegressionSingleObjectiveProblem.cs" /> 135 <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" /> 135 <Compile Include="SingleObjective\SolutionQualityAnalyzer.cs" /> 136 <Compile Include="SingleObjective\SolutionRSquaredAnalyzer.cs" /> 136 137 <Compile Include="SymbolicRegressionPhenotypicDiversityAnalyzer.cs" /> 137 138 <Compile Include="SymbolicRegressionPruningAnalyzer.cs" /> -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SolutionRSquaredAnalyzer.cs
r18052 r18053 31 31 using HeuristicLab.Parameters; 32 32 using HEAL.Attic; 33 using System; 33 34 34 35 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 35 36 [StorableType("789E0217-6DDC-44E8-85CC-A51A976A8FB8")] 36 public class SymbolicRegressionSolutionsAnalyzer : SingleSuccessorOperator, IAnalyzer { 37 [Obsolete("Use SolutionQualityAnalyzer instead")] 38 public class SolutionRSquaredAnalyzer : SingleSuccessorOperator, IAnalyzer { 37 39 private const string ResultCollectionParameterName = "Results"; 38 40 private const string RegressionSolutionQualitiesResultName = "Regression Solution Qualities"; … … 55 57 56 58 [StorableConstructor] 57 protected S ymbolicRegressionSolutionsAnalyzer(StorableConstructorFlag _) : base(_) { }58 protected S ymbolicRegressionSolutionsAnalyzer(SymbolicRegressionSolutionsAnalyzer original, Cloner cloner)59 protected SolutionRSquaredAnalyzer(StorableConstructorFlag _) : base(_) { } 60 protected SolutionRSquaredAnalyzer(SolutionRSquaredAnalyzer original, Cloner cloner) 59 61 : base(original, cloner) { } 60 62 public override IDeepCloneable Clone(Cloner cloner) { 61 return new S ymbolicRegressionSolutionsAnalyzer(this, cloner);63 return new SolutionRSquaredAnalyzer(this, cloner); 62 64 } 63 65 64 public S ymbolicRegressionSolutionsAnalyzer() {66 public SolutionRSquaredAnalyzer() { 65 67 Parameters.Add(new LookupParameter<ResultCollection>(ResultCollectionParameterName, "The result collection to store the analysis results.")); 66 68 Parameters.Add(new LookupParameter<DoubleValue>(TrainingQualityParameterName)); … … 93 95 ILookupParameter<DoubleValue> trainingQualityParam = null; 94 96 ILookupParameter<DoubleValue> testQualityParam = null; 95 // store actual names of parameter because it ischanged below97 // store actual names of parameter because they are changed below 96 98 trainingQualityParam = TrainingQualityParameter; 97 99 string prevTrainingQualityParamName = trainingQualityParam.ActualName; … … 113 115 114 116 // also add training and test R² to the scope using the parameters 115 // HACK: we change the ActualName of the parameter to write t wo variablesfor each solution in the results collection117 // HACK: we change the ActualName of the parameter to write training & test quality for each solution in the results collection 116 118 trainingQualityParam.ActualName = trainingR2Name; 117 119 trainingQualityParam.ActualValue = new DoubleValue(solution.TrainingRSquared); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r17958 r18053 90 90 changed = true; 91 91 } 92 if (!Operators.OfType<S ymbolicRegressionSolutionsAnalyzer>().Any()) {93 Operators.Add(new S ymbolicRegressionSolutionsAnalyzer());92 if (!Operators.OfType<SolutionQualityAnalyzer>().Any()) { 93 Operators.Add(new SolutionQualityAnalyzer()); 94 94 changed = true; 95 95 } … … 119 119 Operators.Add(new SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer()); 120 120 Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer()); 121 Operators.Add(new S ymbolicRegressionSolutionsAnalyzer());121 Operators.Add(new SolutionQualityAnalyzer()); 122 122 Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator()); 123 123 Operators.Add(new ShapeConstraintsAnalyzer());
Note: See TracChangeset
for help on using the changeset viewer.