Changeset 11332
- Timestamp:
- 09/02/14 15:18:51 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolution.cs
r11171 r11332 20 20 #endregion 21 21 22 using System.Linq; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 25 27 using HeuristicLab.Optimization; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 61 63 public SymbolicClassificationSolution(ISymbolicClassificationModel model, IClassificationProblemData problemData) 62 64 : base(model, problemData) { 65 foreach (var node in model.SymbolicExpressionTree.Root.IterateNodesPrefix().OfType<SymbolicExpressionTreeTopLevelNode>()) 66 node.SetGrammar(null); 67 63 68 Add(new Result(ModelLengthResultName, "Length of the symbolic classification model.", new IntValue())); 64 69 Add(new Result(ModelDepthResultName, "Depth of the symbolic classification model.", new IntValue())); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationSolution.cs
r11171 r11332 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 107 108 public SymbolicDiscriminantFunctionClassificationSolution(ISymbolicDiscriminantFunctionClassificationModel model, IClassificationProblemData problemData) 108 109 : base(model, problemData) { 110 foreach (var node in model.SymbolicExpressionTree.Root.IterateNodesPrefix().OfType<SymbolicExpressionTreeTopLevelNode>()) 111 node.SetGrammar(null); 112 109 113 Add(new Result(ModelLengthResultName, "Length of the symbolic classification model.", new IntValue())); 110 114 Add(new Result(ModelDepthResultName, "Depth of the symbolic classification model.", new IntValue())); 111 112 115 113 116 ResultCollection estimationLimitResults = new ResultCollection(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
r11171 r11332 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 102 103 public SymbolicRegressionSolution(ISymbolicRegressionModel model, IRegressionProblemData problemData) 103 104 : base(model, problemData) { 105 foreach (var node in model.SymbolicExpressionTree.Root.IterateNodesPrefix().OfType<SymbolicExpressionTreeTopLevelNode>()) 106 node.SetGrammar(null); 107 104 108 Add(new Result(ModelLengthResultName, "Length of the symbolic regression model.", new IntValue())); 105 109 Add(new Result(ModelDepthResultName, "Depth of the symbolic regression model.", new IntValue())); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
r11171 r11332 91 91 } 92 92 93 94 private static readonly ISymbolicExpressionGrammar grammar = new TypeCoherentExpressionGrammar(); 93 95 private void insertNodeToolStripMenuItem_Click(object sender, EventArgs e) { 94 96 if (currSelected == null || currSelected.Content is SymbolicExpressionTreeTerminalNode) return; … … 96 98 97 99 using (var dialog = new InsertNodeDialog()) { 98 dialog.SetAllowedSymbols( parent.Grammar.Symbols.Where(s => !(s is ProgramRootSymbol || s is StartSymbol || s is Defun || s is GroupSymbol))); // allow everything100 dialog.SetAllowedSymbols(grammar.Symbols.Where(s => !(s is ProgramRootSymbol || s is StartSymbol || s is Defun || s is GroupSymbol))); // allow everything 99 101 dialog.ShowDialog(this); 100 102 if (dialog.DialogResult != DialogResult.OK) return;
Note: See TracChangeset
for help on using the changeset viewer.