- Timestamp:
- 03/17/11 14:07:47 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
r5681 r5733 90 90 ISymbolicExpressionTree tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode()); 91 91 ISymbolicExpressionTreeNode startNode = new StartSymbol().CreateTreeNode(); 92 tree.Root.AddSub Tree(startNode);92 tree.Root.AddSubtree(startNode); 93 93 ISymbolicExpressionTreeNode addition = new Addition().CreateTreeNode(); 94 startNode.AddSub Tree(addition);94 startNode.AddSubtree(addition); 95 95 96 96 int col = 0; … … 99 99 vNode.VariableName = column; 100 100 vNode.Weight = w[col]; 101 addition.AddSub Tree(vNode);101 addition.AddSubtree(vNode); 102 102 col++; 103 103 } … … 105 105 ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode(); 106 106 cNode.Value = w[w.Length - 1]; 107 addition.AddSub Tree(cNode);107 addition.AddSubtree(cNode); 108 108 109 109 -
branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r5658 r5733 94 94 ISymbolicExpressionTree tree = new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode()); 95 95 ISymbolicExpressionTreeNode startNode = new StartSymbol().CreateTreeNode(); 96 tree.Root.AddSub Tree(startNode);96 tree.Root.AddSubtree(startNode); 97 97 ISymbolicExpressionTreeNode addition = new Addition().CreateTreeNode(); 98 startNode.AddSub Tree(addition);98 startNode.AddSubtree(addition); 99 99 100 100 int col = 0; … … 103 103 vNode.VariableName = column; 104 104 vNode.Weight = coefficients[col]; 105 addition.AddSub Tree(vNode);105 addition.AddSubtree(vNode); 106 106 col++; 107 107 } … … 109 109 ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode(); 110 110 cNode.Value = coefficients[coefficients.Length - 1]; 111 addition.AddSub Tree(cNode);111 addition.AddSubtree(cNode); 112 112 113 113 SymbolicRegressionSolution solution = new SymbolicRegressionSolution(new SymbolicRegressionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter()), problemData);
Note: See TracChangeset
for help on using the changeset viewer.