Changeset 10483 for branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 02/20/14 14:56:39 (11 years ago)
- Location:
- branches/LogResidualEvaluator
- Files:
-
- 11 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/LogResidualEvaluator
- Property svn:mergeinfo changed
-
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
-
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r10203 r10483 120 120 <Compile Include="Plugin.cs" /> 121 121 <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" /> 122 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" /> 123 <Compile Include="SymbolicRegressionPruningAnalyzer.cs" /> 122 124 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionLogResidualEvaluator.cs" /> 123 125 <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" /> … … 144 146 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs" /> 145 147 <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs" /> 148 <Compile Include="SymbolicRegressionPruningOperator.cs" /> 146 149 <Compile Include="SymbolicRegressionSolution.cs" /> 147 150 <Compile Include="SymbolicRegressionSolutionImpactValuesCalculator.cs" /> -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r9456 r10483 44 44 public override IEnumerable<bool> Maximization { get { return new bool[2] { false, false }; } } 45 45 46 public override Core.IOperationApply() {46 public override IOperation InstrumentedApply() { 47 47 IEnumerable<int> rows = GenerateRowsToEvaluate(); 48 48 var solution = SymbolicExpressionTreeParameter.ActualValue; 49 49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value); 50 50 QualitiesParameter.ActualValue = new DoubleArray(qualities); 51 return base. Apply();51 return base.InstrumentedApply(); 52 52 } 53 53 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r9456 r10483 44 44 public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } 45 45 46 public override IOperation Apply() {46 public override IOperation InstrumentedApply() { 47 47 IEnumerable<int> rows = GenerateRowsToEvaluate(); 48 48 var solution = SymbolicExpressionTreeParameter.ActualValue; 49 49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value); 50 50 QualitiesParameter.ActualValue = new DoubleArray(qualities); 51 return base. Apply();51 return base.InstrumentedApply(); 52 52 } 53 53 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
r9456 r10483 102 102 } 103 103 104 public override IOperation Apply() {104 public override IOperation InstrumentedApply() { 105 105 var solution = SymbolicExpressionTreeParameter.ActualValue; 106 106 double quality; … … 121 121 QualityParameter.ActualValue = new DoubleValue(quality); 122 122 123 if (Successor != null) 124 return ExecutionContext.CreateOperation(Successor); 125 else 126 return null; 123 return base.InstrumentedApply(); 127 124 } 128 125 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMaxAbsoluteErrorEvaluator.cs
r9456 r10483 42 42 public SymbolicRegressionSingleObjectiveMaxAbsoluteErrorEvaluator() : base() { } 43 43 44 public override IOperation Apply() {44 public override IOperation InstrumentedApply() { 45 45 var solution = SymbolicExpressionTreeParameter.ActualValue; 46 46 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 49 49 QualityParameter.ActualValue = new DoubleValue(quality); 50 50 51 return base. Apply();51 return base.InstrumentedApply(); 52 52 } 53 53 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMeanAbsoluteErrorEvaluator.cs
r9456 r10483 42 42 public SymbolicRegressionSingleObjectiveMeanAbsoluteErrorEvaluator() : base() { } 43 43 44 public override IOperation Apply() {44 public override IOperation InstrumentedApply() { 45 45 var solution = SymbolicExpressionTreeParameter.ActualValue; 46 46 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 49 49 QualityParameter.ActualValue = new DoubleValue(quality); 50 50 51 return base. Apply();51 return base.InstrumentedApply(); 52 52 } 53 53 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs
r9456 r10483 42 42 public SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator() : base() { } 43 43 44 public override IOperation Apply() {44 public override IOperation InstrumentedApply() { 45 45 var solution = SymbolicExpressionTreeParameter.ActualValue; 46 46 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 49 49 QualityParameter.ActualValue = new DoubleValue(quality); 50 50 51 return base. Apply();51 return base.InstrumentedApply(); 52 52 } 53 53 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
r9456 r10483 44 44 public override bool Maximization { get { return true; } } 45 45 46 public override IOperation Apply() {46 public override IOperation InstrumentedApply() { 47 47 var solution = SymbolicExpressionTreeParameter.ActualValue; 48 48 IEnumerable<int> rows = GenerateRowsToEvaluate(); … … 51 51 QualityParameter.ActualValue = new DoubleValue(quality); 52 52 53 return base. Apply();53 return base.InstrumentedApply(); 54 54 } 55 55 -
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs
r9840 r10483 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; 25 using HeuristicLab.Core; 24 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 28 26 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 30 [StorableClass] 31 [Item("SymbolicRegressionSolutionImpactValuesCalculator", "Calculate symbolic expression tree node impact values for regression problems.")] 27 32 public class SymbolicRegressionSolutionImpactValuesCalculator : SymbolicDataAnalysisSolutionImpactValuesCalculator { 33 public SymbolicRegressionSolutionImpactValuesCalculator() { } 34 35 protected SymbolicRegressionSolutionImpactValuesCalculator(SymbolicRegressionSolutionImpactValuesCalculator original, Cloner cloner) 36 : base(original, cloner) { } 37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new SymbolicRegressionSolutionImpactValuesCalculator(this, cloner); 39 } 40 41 [StorableConstructor] 42 protected SymbolicRegressionSolutionImpactValuesCalculator(bool deserializing) : base(deserializing) { } 28 43 public override double CalculateReplacementValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows) { 29 44 var regressionModel = (ISymbolicRegressionModel)model; … … 34 49 35 50 public override double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double originalQuality = double.NaN) { 51 double impactValue, replacementValue; 52 CalculateImpactAndReplacementValues(model, node, problemData, rows, out impactValue, out replacementValue, originalQuality); 53 return impactValue; 54 } 55 56 public override void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, 57 IDataAnalysisProblemData problemData, IEnumerable<int> rows, out double impactValue, out double replacementValue, 58 double originalQuality = Double.NaN) { 36 59 var regressionModel = (ISymbolicRegressionModel)model; 37 60 var regressionProblemData = (IRegressionProblemData)problemData; … … 47 70 } 48 71 49 varreplacementValue = CalculateReplacementValue(regressionModel, node, regressionProblemData, rows);72 replacementValue = CalculateReplacementValue(regressionModel, node, regressionProblemData, rows); 50 73 var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue }; 51 74 … … 63 86 if (errorState != OnlineCalculatorError.None) newQuality = 0.0; 64 87 65 returnoriginalQuality - newQuality;88 impactValue = originalQuality - newQuality; 66 89 } 67 68 90 } 69 91 }
Note: See TracChangeset
for help on using the changeset viewer.