Changeset 4678 for branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators
- Timestamp:
- 10/29/10 19:26:56 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionEvaluator.cs
r4468 r4678 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 102 103 #endregion 103 104 105 [StorableConstructor] 106 protected MultiObjectiveSymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { } 107 protected MultiObjectiveSymbolicRegressionEvaluator(MultiObjectiveSymbolicRegressionEvaluator original, Cloner cloner) : base(original, cloner) { } 104 108 public MultiObjectiveSymbolicRegressionEvaluator() 105 109 : base() { … … 112 116 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end index of the dataset partition on which the symbolic regression solution should be evaluated.")); 113 117 Parameters.Add(new ValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1))); 114 }115 116 [StorableConstructor]117 protected MultiObjectiveSymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { }118 [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)]119 private void AfterDeserialization() {120 118 } 121 119 -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator.cs
r4166 r4678 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; … … 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Problems.DataAnalysis.Evaluators;30 29 using HeuristicLab.Problems.DataAnalysis.Symbolic; 31 30 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols; … … 34 33 [Item("MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator", "Calculates the mean squared error and the number of variables of a symbolic regression solution.")] 35 34 [StorableClass] 36 public class MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator : MultiObjectiveSymbolicRegressionEvaluator {35 public sealed class MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator : MultiObjectiveSymbolicRegressionEvaluator { 37 36 private const string UpperEstimationLimitParameterName = "UpperEstimationLimit"; 38 37 private const string LowerEstimationLimitParameterName = "LowerEstimationLimit"; … … 54 53 } 55 54 #endregion 55 [StorableConstructor] 56 private MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { } 57 private MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator(MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator original, Cloner cloner) 58 : base(original, cloner) { 59 } 56 60 public MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator() 57 61 : base() { 58 62 Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees.")); 59 63 Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees.")); 64 } 65 66 public override IDeepCloneable Clone(Cloner cloner) { 67 return new MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator(this, cloner); 60 68 } 61 69 -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs
r4128 r4678 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; … … 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Problems.DataAnalysis.Evaluators;30 29 using HeuristicLab.Problems.DataAnalysis.Symbolic; 31 30 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols; … … 34 33 [Item("MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator", "Calculates the correlation coefficient r² and the number of variables of a symbolic regression solution.")] 35 34 [StorableClass] 36 public class MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator : MultiObjectiveSymbolicRegressionEvaluator {35 public sealed class MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator : MultiObjectiveSymbolicRegressionEvaluator { 37 36 private const string UpperEstimationLimitParameterName = "UpperEstimationLimit"; 38 37 private const string LowerEstimationLimitParameterName = "LowerEstimationLimit"; … … 54 53 } 55 54 #endregion 55 [StorableConstructor] 56 protected MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator(bool deserializing) : base(deserializing) { } 57 protected MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator(MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator original, Cloner cloner) 58 : base(original, cloner) { 59 } 56 60 public MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator() 57 61 : base() { 58 62 Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees.")); 59 63 Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees.")); 64 } 65 66 public override IDeepCloneable Clone(Cloner cloner) { 67 return new MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator(this, cloner); 60 68 } 61 69 -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SingleObjectiveSymbolicRegressionEvaluator.cs
r4468 r4678 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Data; … … 115 116 #endregion 116 117 118 [StorableConstructor] 119 protected SingleObjectiveSymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { } 120 protected SingleObjectiveSymbolicRegressionEvaluator(SingleObjectiveSymbolicRegressionEvaluator original, Cloner cloner) 121 : base(original, cloner) { 122 } 117 123 public SingleObjectiveSymbolicRegressionEvaluator() 118 124 : base() { … … 129 135 } 130 136 131 [StorableConstructor] 132 protected SingleObjectiveSymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { } 137 133 138 [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)] 134 139 private void AfterDeserialization() { -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionMeanSquaredErrorEvaluator.cs
r4190 r4678 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Parameters;28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 28 using HeuristicLab.Problems.DataAnalysis.Evaluators; … … 35 34 public class SymbolicRegressionMeanSquaredErrorEvaluator : SingleObjectiveSymbolicRegressionEvaluator { 36 35 37 public SymbolicRegressionMeanSquaredErrorEvaluator() 38 : base() { 36 [StorableConstructor] 37 protected SymbolicRegressionMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { } 38 protected SymbolicRegressionMeanSquaredErrorEvaluator(SymbolicRegressionMeanSquaredErrorEvaluator original, Cloner cloner) 39 : base(original, cloner) { 40 } 41 public SymbolicRegressionMeanSquaredErrorEvaluator() : base() { } 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new SymbolicRegressionMeanSquaredErrorEvaluator(this, cloner); 39 45 } 40 46 -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionPearsonsRSquaredEvaluator.cs
r4190 r4678 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Parameters;28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 28 using HeuristicLab.Problems.DataAnalysis.Evaluators; … … 34 33 [StorableClass] 35 34 public class SymbolicRegressionPearsonsRSquaredEvaluator : SingleObjectiveSymbolicRegressionEvaluator { 36 public SymbolicRegressionPearsonsRSquaredEvaluator() 37 : base() { 35 [StorableConstructor] 36 protected SymbolicRegressionPearsonsRSquaredEvaluator(bool deserializing) : base(deserializing) { } 37 protected SymbolicRegressionPearsonsRSquaredEvaluator(SymbolicRegressionPearsonsRSquaredEvaluator original, Cloner cloner) 38 : base(original, cloner) { 38 39 } 40 public SymbolicRegressionPearsonsRSquaredEvaluator() : base() { } 39 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new SymbolicRegressionPearsonsRSquaredEvaluator(this, cloner); 44 } 40 45 public override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) { 41 46 double mse = Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows); -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs
r4190 r4678 34 34 [Item("SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator", "Calculates the mean and the variance of the squared errors of a linearly scaled symbolic regression solution.")] 35 35 [StorableClass] 36 public class SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator {36 public sealed class SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator { 37 37 private const string QualityVarianceParameterName = "QualityVariance"; 38 38 private const string QualitySamplesParameterName = "QualitySamples"; … … 90 90 } 91 91 #endregion 92 [StorableConstructor] 93 private SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator(bool deserializing) : base(deserializing) { } 94 private SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator(SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator original, Cloner cloner) : base(original, cloner) { } 92 95 public SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator() 93 96 : base() { … … 100 103 Parameters.Add(new LookupParameter<DoubleValue>(DecompositionVarianceParameterName, "A parameter which stores the relativ bias of the MSE.")); 101 104 Parameters.Add(new LookupParameter<DoubleValue>(DecompositionCovarianceParameterName, "A parameter which stores the relativ bias of the MSE.")); 105 } 106 107 public override IDeepCloneable Clone(Cloner cloner) { 108 return new SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator(this, cloner); 102 109 } 103 110 -
branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs
r4477 r4678 34 34 [Item("SymbolicRegressionScaledMeanSquaredErrorEvaluator", "Calculates the mean squared error of a linearly scaled symbolic regression solution.")] 35 35 [StorableClass] 36 public class SymbolicRegressionScaledMeanSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator {36 public sealed class SymbolicRegressionScaledMeanSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator { 37 37 38 38 #region parameter properties … … 54 54 } 55 55 #endregion 56 [StorableConstructor] 57 private SymbolicRegressionScaledMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { } 58 private SymbolicRegressionScaledMeanSquaredErrorEvaluator(SymbolicRegressionScaledMeanSquaredErrorEvaluator original, Cloner cloner) : base(original, cloner) { } 56 59 public SymbolicRegressionScaledMeanSquaredErrorEvaluator() 57 60 : base() { 58 61 Parameters.Add(new LookupParameter<DoubleValue>("Alpha", "Alpha parameter for linear scaling of the estimated values.")); 59 62 Parameters.Add(new LookupParameter<DoubleValue>("Beta", "Beta parameter for linear scaling of the estimated values.")); 63 } 64 65 public override IDeepCloneable Clone(Cloner cloner) { 66 return new SymbolicRegressionScaledMeanSquaredErrorEvaluator(this, cloner); 60 67 } 61 68
Note: See TracChangeset
for help on using the changeset viewer.