- Timestamp:
- 05/19/11 15:45:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
r6233 r6234 145 145 } else { 146 146 var mainBranch = startNode.GetSubtree(0); 147 var product = MakeProduct(mainBranch, beta);148 147 startNode.RemoveSubtree(0); 149 startNode.AddSubtree(product); 150 151 var scaledMainBranch = MakeSum(product, alpha); 152 startNode.RemoveSubtree(0); 148 var scaledMainBranch = MakeSum(MakeProduct(mainBranch, beta), alpha); 153 149 startNode.AddSubtree(scaledMainBranch); 154 150 } … … 159 155 return treeNode; 160 156 } else { 161 var addition = treeNode.Grammar.Symbols.OfType<Addition>().FirstOrDefault(); 162 if (addition == null) addition = new Addition(); 157 var addition = new Addition(); 163 158 var node = addition.CreateTreeNode(); 164 159 var alphaConst = MakeConstant(alpha); … … 173 168 return treeNode; 174 169 } else { 175 var multipliciation = treeNode.Grammar.Symbols.OfType<Multiplication>().FirstOrDefault(); 176 if (multipliciation == null) multipliciation = new Multiplication(); 170 var multipliciation = new Multiplication(); 177 171 var node = multipliciation.CreateTreeNode(); 178 172 var betaConst = MakeConstant(beta);
Note: See TracChangeset
for help on using the changeset viewer.