- Timestamp:
- 07/20/10 14:58:29 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
r4034 r4054 236 236 } 237 237 238 int trainingStart = ProblemData.TrainingSamplesStart.Value;239 int trainingEnd = ProblemData.TrainingSamplesEnd.Value;240 int testStart = ProblemData.TestSamplesStart.Value;241 int testEnd = ProblemData.TestSamplesEnd.Value;242 243 SymbolicRegressionModelQualityAnalyzer.Analyze(scaledTrees, SymbolicExpressionTreeInterpreter,244 UpperEstimationLimit.Value, LowerEstimationLimit.Value,245 ProblemData, trainingStart, trainingEnd, testStart, testEnd, Results);246 247 #region validation best model248 238 string targetVariable = ProblemData.TargetVariable.Value; 249 239 int validationStart = ValidiationSamplesStart.Value; … … 268 258 } 269 259 270 271 260 if (BestSolutionQualityParameter.ActualValue == null || BestSolutionQualityParameter.ActualValue.Value > bestValidationMse) { 272 261 var model = new SymbolicRegressionModel((ISymbolicExpressionTreeInterpreter)SymbolicExpressionTreeInterpreter.Clone(), … … 293 282 AddValue(validationValues, BestSolutionQualityParameter.ActualValue.Value, BestSolutionQualityParameterName, BestSolutionQualityParameterName); 294 283 AddValue(validationValues, bestValidationMse, CurrentBestValidationQualityParameterName, CurrentBestValidationQualityParameterName); 295 #endregion296 284 return base.Apply(); 297 285 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs
r3996 r4054 91 91 private const string RelativeErrorValuesParameterName = "Average relative error"; 92 92 93 private const string TrainingSamplesStartParameterName = "TrainingSamplesStart";94 private const string TrainingSamplesEndParameterName = "TrainingSamplesEnd";95 private const string TestSamplesStartParameterName = "TestSamplesStart";96 private const string TestSamplesEndParameterName = "TestSamplesEnd";97 93 private const string UpperEstimationLimitParameterName = "UpperEstimationLimit"; 98 94 private const string LowerEstimationLimitParameterName = "LowerEstimationLimit"; … … 107 103 public IValueLookupParameter<DataAnalysisProblemData> ProblemDataParameter { 108 104 get { return (IValueLookupParameter<DataAnalysisProblemData>)Parameters[ProblemDataParameterName]; } 109 }110 public IValueLookupParameter<IntValue> TrainingSamplesStartParameter {111 get { return (IValueLookupParameter<IntValue>)Parameters[TrainingSamplesStartParameterName]; }112 }113 public IValueLookupParameter<IntValue> TrainingSamplesEndParameter {114 get { return (IValueLookupParameter<IntValue>)Parameters[TrainingSamplesEndParameterName]; }115 }116 public IValueLookupParameter<IntValue> TestSamplesStartParameter {117 get { return (IValueLookupParameter<IntValue>)Parameters[TestSamplesStartParameterName]; }118 }119 public IValueLookupParameter<IntValue> TestSamplesEndParameter {120 get { return (IValueLookupParameter<IntValue>)Parameters[TestSamplesEndParameterName]; }121 105 } 122 106 public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter { … … 144 128 Parameters.Add(new ValueLookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree.")); 145 129 Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data containing the input varaibles for the symbolic regression problem.")); 146 Parameters.Add(new ValueLookupParameter<IntValue>(TrainingSamplesStartParameterName, "The first index of the training data set partition on which the model quality values should be calculated."));147 Parameters.Add(new ValueLookupParameter<IntValue>(TrainingSamplesEndParameterName, "The last index of the training data set partition on which the model quality values should be calculated."));148 Parameters.Add(new ValueLookupParameter<IntValue>(TestSamplesStartParameterName, "The first index of the test data set partition on which the model quality values should be calculated."));149 Parameters.Add(new ValueLookupParameter<IntValue>(TestSamplesEndParameterName, "The last index of the test data set partition on which the model quality values should be calculated."));150 130 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.")); 151 131 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.")); … … 162 142 Analyze(SymbolicExpressionTreeParameter.ActualValue, SymbolicExpressionTreeInterpreterParameter.ActualValue, 163 143 UpperEstimationLimit.Value, LowerEstimationLimit.Value, ProblemDataParameter.ActualValue, 164 TrainingSamplesStartParameter.ActualValue.Value, TrainingSamplesEndParameter.ActualValue.Value,165 TestSamplesStartParameter.ActualValue.Value, TestSamplesEndParameter.ActualValue.Value,144 ProblemDataParameter.ActualValue.TrainingSamplesStart.Value, ProblemDataParameter.ActualValue.TrainingSamplesEnd.Value, 145 ProblemDataParameter.ActualValue.TestSamplesStart.Value, ProblemDataParameter.ActualValue.TestSamplesEnd.Value, 166 146 ResultsParameter.ActualValue); 167 147 return base.Apply(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
r3926 r4054 186 186 modelQualityAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 187 187 modelQualityAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 188 modelQualityAnalyzer.TrainingSamplesStartParameter.ActualName = TrainingSamplesStartParameter.Name;189 modelQualityAnalyzer.TrainingSamplesEndParameter.ActualName = TrainingSamplesEndParameter.Name;190 modelQualityAnalyzer.TestSamplesStartParameter.ActualName = TestSamplesStartParameter.Name;191 modelQualityAnalyzer.TestSamplesEndParameter.ActualName = TestSamplesEndParameter.Name;192 188 193 189 validationMseEvaluator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r4036 r4054 221 221 [StorableHook(HookType.AfterDeserialization)] 222 222 private void AfterDeserializationHook() { 223 Initialize(); 223 RegisterParameterEvents(); 224 RegisterParameterValueEvents(); 224 225 } 225 226 … … 344 345 operators.Add(new FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer()); 345 346 operators.Add(new MinAverageMaxSymbolicExpressionTreeSizeAnalyzer()); 347 operators.Add(new SymbolicRegressionModelQualityAnalyzer()); 346 348 ParameterizeOperators(); 347 349 ParameterizeAnalyzers(); … … 390 392 bestValidationSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 391 393 } 394 var symbolicRegressionModelQualityAnalyzer = analyzer as SymbolicRegressionModelQualityAnalyzer; 395 if (symbolicRegressionModelQualityAnalyzer != null) { 396 symbolicRegressionModelQualityAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name; 397 symbolicRegressionModelQualityAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name; 398 symbolicRegressionModelQualityAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name; 399 symbolicRegressionModelQualityAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name; 400 symbolicRegressionModelQualityAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName; 401 } 392 402 var varFreqAnalyzer = analyzer as SymbolicRegressionVariableFrequencyAnalyzer; 393 403 if (varFreqAnalyzer != null) {
Note: See TracChangeset
for help on using the changeset viewer.