Changeset 5275 for branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
- Timestamp:
- 01/11/11 15:03:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r4341 r5275 34 34 [Creatable("Problems")] 35 35 [StorableClass] 36 public class SymbolicRegressionProblem : SymbolicRegressionProblemBase, ISingleObjectiveProblem {36 public sealed class SymbolicRegressionProblem : SymbolicRegressionProblemBase, ISingleObjectiveDataAnalysisProblem { 37 37 38 38 #region Parameter Properties … … 74 74 75 75 [StorableConstructor] 76 protected SymbolicRegressionProblem(bool deserializing) : base(deserializing) { } 76 private SymbolicRegressionProblem(bool deserializing) : base(deserializing) { } 77 private SymbolicRegressionProblem(SymbolicRegressionProblem original, Cloner cloner) 78 : base(original, cloner) { 79 RegisterParameterEvents(); 80 RegisterParameterValueEvents(); 81 } 82 77 83 public SymbolicRegressionProblem() 78 84 : base() { … … 81 87 Parameters.Add(new ValueParameter<ISymbolicRegressionEvaluator>("Evaluator", "The operator which should be used to evaluate symbolic regression solutions.", evaluator)); 82 88 Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The minimal error value that reached by symbolic regression solutions for the problem.")); 83 84 evaluator.QualityParameter.ActualName = "TrainingPearsonR2";85 89 86 90 InitializeOperators(); … … 92 96 93 97 public override IDeepCloneable Clone(Cloner cloner) { 94 SymbolicRegressionProblem clone = (SymbolicRegressionProblem)base.Clone(cloner); 95 clone.RegisterParameterEvents(); 96 clone.RegisterParameterValueEvents(); 97 return clone; 98 return new SymbolicRegressionProblem(this, cloner); 98 99 } 99 100 … … 146 147 private void InitializeOperators() { 147 148 AddOperator(new FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer()); 149 AddOperator(new SymbolicRegressionOverfittingAnalyzer()); 148 150 ParameterizeAnalyzers(); 149 151 } … … 159 161 foreach (var analyzer in Analyzers) { 160 162 analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 163 var validationSolutionAnalyzer = analyzer as SymbolicRegressionValidationAnalyzer; 164 if (validationSolutionAnalyzer != null) { 165 validationSolutionAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 166 validationSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; 167 validationSolutionAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 168 validationSolutionAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 169 validationSolutionAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 170 validationSolutionAnalyzer.ValidationSamplesStartParameter.Value = ValidationSamplesStart; 171 validationSolutionAnalyzer.ValidationSamplesEndParameter.Value = ValidationSamplesEnd; 172 } 173 161 174 var fixedBestValidationSolutionAnalyzer = analyzer as FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer; 162 175 if (fixedBestValidationSolutionAnalyzer != null) { 163 fixedBestValidationSolutionAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;164 fixedBestValidationSolutionAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;165 fixedBestValidationSolutionAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;166 fixedBestValidationSolutionAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;167 fixedBestValidationSolutionAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;168 fixedBestValidationSolutionAnalyzer.ValidationSamplesStartParameter.Value = ValidationSamplesStart;169 fixedBestValidationSolutionAnalyzer.ValidationSamplesEndParameter.Value = ValidationSamplesEnd;170 176 fixedBestValidationSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name; 171 177 } 178 172 179 var bestValidationSolutionAnalyzer = analyzer as ValidationBestScaledSymbolicRegressionSolutionAnalyzer; 173 180 if (bestValidationSolutionAnalyzer != null) {
Note: See TracChangeset
for help on using the changeset viewer.