- Timestamp:
- 07/11/18 16:43:41 (7 years ago)
- Location:
- branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration
- Files:
-
- 2 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 -
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/GrammarEnumerationAlgorithm.cs
r15993 r15994 390 390 updateConstantsInTree: true); 391 391 392 model.Scale(Problem.ProblemData); 392 393 var bestTrainingSolution = new SymbolicRegressionSolution(model, Problem.ProblemData); 394 393 395 Results.AddOrUpdateResult(BestTrainingModelResultName, model); 394 396 Results.AddOrUpdateResult(BestTrainingSolutionResultName, bestTrainingSolution);
Note: See TracChangeset
for help on using the changeset viewer.