Changeset 15860 for branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis
- Timestamp:
- 03/23/18 18:36:23 (7 years ago)
- Location:
- branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis/RSquaredEvaluator.cs
r15859 r15860 77 77 problemData.TrainingIndices, 78 78 applyLinearScaling: false, 79 maxIterations: 200,79 maxIterations: 50, 80 80 updateVariableWeights: true, 81 81 updateConstantsInTree: true); … … 96 96 //var estVals = model.GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices); 97 97 //OnlineCalculatorError error; 98 // r2 = OnlinePearsonsRCalculator.Calculate(target, estVals, out error);98 //double r2 = OnlinePearsonsRCalculator.Calculate(target, estVals, out error); 99 99 //if (error != OnlineCalculatorError.None) r2 = 0.0; 100 100 … … 102 102 bool better = r2 > bestR2Result.Value; 103 103 bool equallyGood = r2.IsAlmost(bestR2Result.Value); 104 bool shorter = algorithm.BestTrainingSentence != null && symbolString.Count() < algorithm.BestTrainingSentence.Count(); 104 bool shorter = false; 105 106 if (!better && equallyGood) { 107 shorter = algorithm.BestTrainingSentence != null && 108 algorithm.Grammar.GetComplexity(algorithm.BestTrainingSentence) > algorithm.Grammar.GetComplexity(symbolString); 109 } 105 110 if (better || (equallyGood && shorter)) { 106 111 bestR2Result.Value = r2; -
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Analysis/SentenceLogger.cs
r15843 r15860 45 45 46 46 private void GrammarEnumerationAlgorithmOnStarted(object sender, EventArgs eventArgs) { 47 string datePostfix = $"_{DateTime.Now:yyyy-MM-dd_HH-mm}_TreeSize-{((GrammarEnumerationAlgorithm) sender).Max TreeSize}.csv";47 string datePostfix = $"_{DateTime.Now:yyyy-MM-dd_HH-mm}_TreeSize-{((GrammarEnumerationAlgorithm) sender).MaxComplexity}.csv"; 48 48 distinctSentencesFileName = workingDir + @"\distinctSentences" + datePostfix; 49 49 allSentencesFileName = workingDir + @"\allSentences" + datePostfix;
Note: See TracChangeset
for help on using the changeset viewer.