Changeset 5246 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs
- Timestamp:
- 01/08/11 13:04:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs
r5199 r5246 123 123 } 124 124 125 public static void UpdateBestSolutionResults(DataAnalysisSolution bestSolution, DataAnalysisProblemData problemData, ResultCollection results, IntValue CurrentGeneration) { 126 var solution = bestSolution; 125 public static void UpdateBestSolutionResults(DataAnalysisSolution solution, DataAnalysisProblemData problemData, ResultCollection results, IntValue generation) { 127 126 #region update R2,MSE, Rel Error 128 127 IEnumerable<double> trainingValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable.Value, problemData.TrainingIndizes); … … 170 169 results[BestSolutionTrainingRelativeError].Value = new DoubleValue(trainingRelError); 171 170 results[BestSolutionTestRelativeError].Value = new DoubleValue(testRelError); 172 if ( CurrentGeneration != null) // this check is needed because linear regression solutions do not have a generations parameter173 results[BestSolutionGeneration].Value = new IntValue( CurrentGeneration.Value);171 if (generation != null) // this check is needed because linear regression solutions do not have a generations parameter 172 results[BestSolutionGeneration].Value = new IntValue(generation.Value); 174 173 } else { 175 174 results.Add(new Result(BestSolutionResultName, solution)); … … 180 179 results.Add(new Result(BestSolutionTrainingRelativeError, new DoubleValue(trainingRelError))); 181 180 results.Add(new Result(BestSolutionTestRelativeError, new DoubleValue(testRelError))); 182 if ( CurrentGeneration != null)183 results.Add(new Result(BestSolutionGeneration, new IntValue( CurrentGeneration.Value)));181 if (generation != null) 182 results.Add(new Result(BestSolutionGeneration, new IntValue(generation.Value))); 184 183 } 185 184 #endregion
Note: See TracChangeset
for help on using the changeset viewer.