Changeset 12294 for branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization
- Timestamp:
- 04/08/15 10:09:47 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization/Grammar.cs
r12014 r12294 184 184 Debug.Assert(maxLenOfReplacement > 0); 185 185 186 var alts = Get Alternatives(nt).Where(alt => MinPhraseLength(alt) <= maxLenOfReplacement);186 var alts = GetTerminalAlternatives(nt).Where(alt => MinPhraseLength(alt) <= maxLenOfReplacement); 187 187 Debug.Assert(alts.Any()); 188 188 -
branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization/Problems/SymbolicRegressionPoly10Problem.cs
r12290 r12294 163 163 // .Concat(new Feature[] { new Feature(CanonicalRepresentation(phrase), 1.0) }); 164 164 165 var partialInterpreter = new PartialExpressionInterpreter(); 166 var vars = new double[] { 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, }; 167 var s = partialInterpreter.Interpret(phrase, vars); 168 //if (s.Any()) 169 // return new Feature[] { new Feature(s.Pop().ToString(), 1.0), }; 170 //else 171 // return new Feature[] { new Feature("$", 1.0), }; 172 return new Feature[] { new Feature(string.Join(",", s), 1.0) }; 165 //return new Feature[] { new Feature(phrase, 1.0), }; 166 167 var partialInterpreter = new PartialExpressionInterpreter(); 168 var vars = new double[] { 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, }; 169 var s = partialInterpreter.Interpret(phrase, vars); 170 //if (s.Any()) 171 // return new Feature[] { new Feature(s.Pop().ToString(), 1.0), }; 172 //else 173 // return new Feature[] { new Feature("$", 1.0), }; 174 return new Feature[] { new Feature(string.Join(",", s), 1.0) }; 173 175 } 174 176
Note: See TracChangeset
for help on using the changeset viewer.