Changeset 12295 for branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization/Problems
- Timestamp:
- 04/08/15 13:05:53 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Problems.GrammaticalOptimization/Problems/SymbolicRegressionPoly10Problem.cs
r12294 r12295 163 163 // .Concat(new Feature[] { new Feature(CanonicalRepresentation(phrase), 1.0) }); 164 164 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 //else173 // return new Feature[] { new Feature("$", 1.0), };174 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) }; 175 175 } 176 176
Note: See TracChangeset
for help on using the changeset viewer.