Changeset 15994 for branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis/RSquaredEvaluator.cs
- Timestamp:
- 07/11/18 16:43:41 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis/RSquaredEvaluator.cs
r15993 r15994 86 86 87 87 if (algorithm.BestTrainingSentence == null || r2 > bestR2 || (r2.IsAlmost(bestR2) && complexity < bestComplexity)) { 88 results.AddOrUpdateResult(BestTrainingQualityResultName, new DoubleValue(r2)); 88 algorithm.BestTrainingSentence = symbolString; 89 90 var model = new SymbolicRegressionModel(problemData.TargetVariable, tree, expressionTreeLinearInterpreter); 91 model.Scale(problemData); 92 var bestSolution = model.CreateRegressionSolution(problemData); 93 94 results.AddOrUpdateResult(BestTrainingQualityResultName, new DoubleValue(bestSolution.TrainingRSquared)); 95 results.AddOrUpdateResult(BestTestQualityResultName, new DoubleValue(bestSolution.TestRSquared)); 96 results.AddOrUpdateResult(BestTrainingModelResultName, bestSolution.Model); 97 results.AddOrUpdateResult(BestTrainingSolutionResultName, bestSolution); 89 98 results.AddOrUpdateResult(BestComplexityResultName, new IntValue(complexity)); 90 algorithm.BestTrainingSentence = symbolString;91 99 92 100 // record best sentence quality & length
Note: See TracChangeset
for help on using the changeset viewer.