- Timestamp:
- 06/08/10 17:47:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs
r3892 r3905 44 44 private const string LowerEstimationLimitParameterName = "LowerEstimationLimit"; 45 45 private const string BestSolutionQualityParameterName = "BestSolutionQuality"; 46 private const string GenerationsParameterName = "Generations"; 46 47 private const string ResultsParameterName = "Results"; 47 48 private const string BestSolutionResultName = "Best solution (on validiation set)"; … … 52 53 private const string BestSolutionTrainingRelativeError = "Best solution average relative error (training)"; 53 54 private const string BestSolutionTestRelativeError = "Best solution average relative error (test)"; 55 private const string BestSolutionGeneration = "Best solution generation"; 54 56 55 57 #region parameter properties … … 71 73 public ILookupParameter<ResultCollection> ResultsParameter { 72 74 get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; } 75 } 76 public ILookupParameter<IntValue> GenerationsParameter { 77 get { 78 return (ILookupParameter<IntValue>)Parameters[GenerationsParameterName]; 79 } 73 80 } 74 81 #endregion … … 98 105 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The qualities of the symbolic regression trees which should be analyzed.")); 99 106 Parameters.Add(new LookupParameter<DoubleValue>(BestSolutionQualityParameterName, "The quality of the best regression solution.")); 107 Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations calculated so far.")); 100 108 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection where the best symbolic regression solution should be stored.")); 109 } 110 111 [StorableHook(HookType.AfterDeserialization)] 112 public void Initialize() { 113 // backwards compatibility 114 if (!Parameters.ContainsKey(GenerationsParameterName)) { 115 Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations calculated so far.")); 116 } 101 117 } 102 118 … … 135 151 Results[BestSolutionTrainingRelativeError].Value = new DoubleValue(trainingRelError); 136 152 Results[BestSolutionTestRelativeError].Value = new DoubleValue(testRelError); 153 Results[BestSolutionGeneration].Value = new IntValue(GenerationsParameter.ActualValue.Value); 137 154 } else { 138 155 Results.Add(new Result(BestSolutionResultName, solution)); … … 143 160 Results.Add(new Result(BestSolutionTrainingRelativeError, new DoubleValue(trainingRelError))); 144 161 Results.Add(new Result(BestSolutionTestRelativeError, new DoubleValue(testRelError))); 162 Results.Add(new Result(BestSolutionGeneration, new IntValue(GenerationsParameter.ActualValue.Value))); 145 163 } 146 164 #endregion
Note: See TracChangeset
for help on using the changeset viewer.