Changeset 15985 for branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis
- Timestamp:
- 07/05/18 15:33:21 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis/RSquaredEvaluator.cs
r15982 r15985 83 83 return; 84 84 85 var bestComplexity = int.MaxValue; 86 if (results.ContainsKey(BestComplexityResultName)) { 87 bestComplexity = GetValue<int>(results[BestComplexityResultName].Value); 88 } else if (algorithm.BestTrainingSentence != null) { 89 bestComplexity = grammar.GetComplexity(algorithm.BestTrainingSentence); 90 results.AddOrUpdateResult(BestComplexityResultName, new IntValue(bestComplexity)); 91 } 85 var bestComplexity = results.ContainsKey(BestComplexityResultName) ? GetValue<int>(results[BestComplexityResultName].Value) : int.MaxValue; 92 86 var complexity = grammar.GetComplexity(symbolString); 93 87 94 if ( r2 > bestR2 || (r2.IsAlmost(bestR2) && complexity < bestComplexity)) {88 if (algorithm.BestTrainingSentence == null || r2 > bestR2 || (r2.IsAlmost(bestR2) && complexity < bestComplexity)) { 95 89 results.AddOrUpdateResult(BestTrainingQualityResultName, new DoubleValue(r2)); 96 90 results.AddOrUpdateResult(BestComplexityResultName, new IntValue(complexity)); … … 109 103 problemData, 110 104 problemData.TrainingIndices, 111 applyLinearScaling: false,105 applyLinearScaling: true, 112 106 maxIterations: 10, 113 107 updateVariableWeights: false,
Note: See TracChangeset
for help on using the changeset viewer.