- Timestamp:
- 05/14/10 14:17:07 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
r3800 r3806 49 49 private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter"; 50 50 private const string ProblemDataParameterName = "ProblemData"; 51 private const string SamplesStartParameterName = "SamplesStart"; 52 private const string SamplesEndParameterName = "SamplesEnd"; 51 private const string TrainingSamplesStartParameterName = "TrainingSamplesStart"; 52 private const string TrainingSamplesEndParameterName = "TrainingSamplesEnd"; 53 private const string ValidationSamplesStartParameterName = "ValidationSamplesStart"; 54 private const string ValidationSamplesEndParameterName = "ValidationSamplesEnd"; 55 private const string TestSamplesStartParameterName = "TestSamplesStart"; 56 private const string TestSamplesEndParameterName = "TestSamplesEnd"; 53 57 private const string QualityParameterName = "Quality"; 54 58 private const string ScaledQualityParameterName = "ScaledQuality"; … … 75 79 get { return (IValueLookupParameter<DataAnalysisProblemData>)Parameters[ProblemDataParameterName]; } 76 80 } 77 public IValueLookupParameter<IntValue> SamplesStartParameter { 78 get { return (IValueLookupParameter<IntValue>)Parameters[SamplesStartParameterName]; } 79 } 80 public IValueLookupParameter<IntValue> SamplesEndParameter { 81 get { return (IValueLookupParameter<IntValue>)Parameters[SamplesEndParameterName]; } 81 public IValueLookupParameter<IntValue> TrainingSamplesStartParameter { 82 get { return (IValueLookupParameter<IntValue>)Parameters[TrainingSamplesStartParameterName]; } 83 } 84 public IValueLookupParameter<IntValue> TrainingSamplesEndParameter { 85 get { return (IValueLookupParameter<IntValue>)Parameters[TrainingSamplesEndParameterName]; } 86 } 87 public IValueLookupParameter<IntValue> ValidationSamplesStartParameter { 88 get { return (IValueLookupParameter<IntValue>)Parameters[ValidationSamplesStartParameterName]; } 89 } 90 public IValueLookupParameter<IntValue> ValidationSamplesEndParameter { 91 get { return (IValueLookupParameter<IntValue>)Parameters[ValidationSamplesEndParameterName]; } 92 } 93 public IValueLookupParameter<IntValue> TestSamplesStartParameter { 94 get { return (IValueLookupParameter<IntValue>)Parameters[TestSamplesStartParameterName]; } 95 } 96 public IValueLookupParameter<IntValue> TestSamplesEndParameter { 97 get { return (IValueLookupParameter<IntValue>)Parameters[TestSamplesEndParameterName]; } 82 98 } 83 99 public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter { … … 108 124 [Storable] 109 125 private BestQualityMemorizer bestKnownQualityMemorizer; 126 [Storable] 127 private SymbolicRegressionModelQualityAnalyzer modelQualityAnalyzer; 110 128 111 129 public ValidationBestScaledSymbolicRegressionSolutionAnalyzer() … … 115 133 Parameters.Add(new ValueLookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used for the analysis of symbolic expression trees.")); 116 134 Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data for which the symbolic expression tree is a solution.")); 117 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The first index of the validation partition of the data set.")); 118 Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The last index of the validation partition of the data set.")); 135 Parameters.Add(new ValueLookupParameter<IntValue>(TrainingSamplesStartParameterName, "The first index of the training partition of the data set.")); 136 Parameters.Add(new ValueLookupParameter<IntValue>(TrainingSamplesEndParameterName, "The last index of the training partition of the data set.")); 137 Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesStartParameterName, "The first index of the validation partition of the data set.")); 138 Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesEndParameterName, "The last index of the validation partition of the data set.")); 139 Parameters.Add(new ValueLookupParameter<IntValue>(TestSamplesStartParameterName, "The first index of the test partition of the data set.")); 140 Parameters.Add(new ValueLookupParameter<IntValue>(TestSamplesEndParameterName, "The last index of the test partition of the data set.")); 119 141 Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper estimation limit that was set for the evaluation of the symbolic expression trees.")); 120 142 Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower estimation limit that was set for the evaluation of the symbolic expression trees.")); … … 127 149 subScopesProcessor = new UniformSubScopesProcessor(); 128 150 SymbolicRegressionSolutionLinearScaler linearScaler = new SymbolicRegressionSolutionLinearScaler(); 151 modelQualityAnalyzer = new SymbolicRegressionModelQualityAnalyzer(); 129 152 SymbolicRegressionMeanSquaredErrorEvaluator validationMseEvaluator = new SymbolicRegressionMeanSquaredErrorEvaluator(); 130 153 bestSolutionAnalyzer = new BestSymbolicRegressionSolutionAnalyzer(); … … 143 166 linearScaler.ScaledSymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName; 144 167 168 modelQualityAnalyzer.ProblemDataParameter.ActualName = ProblemDataParameter.Name; 169 modelQualityAnalyzer.SymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName; 170 modelQualityAnalyzer.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth; 171 modelQualityAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; 172 modelQualityAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 173 modelQualityAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 174 modelQualityAnalyzer.TrainingSamplesStartParameter.ActualName = TrainingSamplesStartParameter.Name; 175 modelQualityAnalyzer.TrainingSamplesEndParameter.ActualName = TrainingSamplesEndParameter.Name; 176 modelQualityAnalyzer.TestSamplesStartParameter.ActualName = TestSamplesStartParameter.Name; 177 modelQualityAnalyzer.TestSamplesEndParameter.ActualName = TestSamplesEndParameter.Name; 178 145 179 validationMseEvaluator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 146 180 validationMseEvaluator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; … … 149 183 validationMseEvaluator.QualityParameter.ActualName = ScaledQualityParameterName; 150 184 validationMseEvaluator.RegressionProblemDataParameter.ActualName = ProblemDataParameter.Name; 151 validationMseEvaluator.SamplesStartParameter.ActualName = SamplesStartParameter.Name;152 validationMseEvaluator.SamplesEndParameter.ActualName = SamplesEndParameter.Name;185 validationMseEvaluator.SamplesStartParameter.ActualName = ValidationSamplesStartParameter.Name; 186 validationMseEvaluator.SamplesEndParameter.ActualName = ValidationSamplesEndParameter.Name; 153 187 154 188 bestSolutionAnalyzer.BestSolutionParameter.ActualName = BestSolutionParameter.Name; … … 190 224 linearScaler.Successor = validationMseEvaluator; 191 225 validationMseEvaluator.Successor = null; 192 subScopesProcessor.Successor = bestSolutionAnalyzer; 226 subScopesProcessor.Successor = modelQualityAnalyzer; 227 modelQualityAnalyzer.Successor = bestSolutionAnalyzer; 193 228 bestSolutionAnalyzer.Successor = bestAvgWorstValidationQualityCalculator; 194 229 bestAvgWorstValidationQualityCalculator.Successor = bestKnownQualityMemorizer; … … 221 256 bestAvgWorstValidationQualityCalculator.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth; 222 257 bestKnownQualityMemorizer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth; 258 modelQualityAnalyzer.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth; 223 259 } 224 260 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r3800 r3806 371 371 operators.Add(new MinAvgMaxSymbolicExpressionTreeSizeAnalyzer()); 372 372 operators.Add(new SymbolicRegressionVariableFrequencyAnalyzer()); 373 operators.Add(new SymbolicRegressionModelQualityAnalyzer());374 373 ParameterizeOperators(); 375 374 ParameterizeAnalyzers(); … … 401 400 bestValidationSolutionAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 402 401 bestValidationSolutionAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 403 bestValidationSolutionAnalyzer.SamplesStartParameter.Value = ValidationSamplesStart; 404 bestValidationSolutionAnalyzer.SamplesEndParameter.Value = ValidationSamplesEnd; 402 bestValidationSolutionAnalyzer.TrainingSamplesStartParameter.Value = TrainingSamplesStart; 403 bestValidationSolutionAnalyzer.TrainingSamplesEndParameter.Value = TrainingSamplesEnd; 404 bestValidationSolutionAnalyzer.ValidationSamplesStartParameter.Value = ValidationSamplesStart; 405 bestValidationSolutionAnalyzer.ValidationSamplesEndParameter.Value = ValidationSamplesEnd; 406 bestValidationSolutionAnalyzer.TestSamplesStartParameter.Value = TestSamplesStart; 407 bestValidationSolutionAnalyzer.TestSamplesEndParameter.Value = TestSamplesEnd; 405 408 bestValidationSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name; 406 409 bestValidationSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; … … 410 413 varFreqAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 411 414 } 412 var modelQualityAnalyzer = analyzer as SymbolicRegressionModelQualityAnalyzer;413 if (modelQualityAnalyzer != null) {414 modelQualityAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;415 modelQualityAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;416 modelQualityAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;417 modelQualityAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;418 modelQualityAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;419 modelQualityAnalyzer.TrainingSamplesStartParameter.Value = TrainingSamplesStart;420 modelQualityAnalyzer.TrainingSamplesEndParameter.Value = ValidationSamplesEnd;421 modelQualityAnalyzer.TestSamplesStartParameter.Value = TestSamplesStart;422 modelQualityAnalyzer.TestSamplesEndParameter.Value = TestSamplesEnd;423 }424 415 } 425 416 foreach (ISymbolicExpressionTreeAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
Note: See TracChangeset
for help on using the changeset viewer.