- Timestamp:
- 05/30/11 17:31:53 (14 years ago)
- Location:
- branches/histogram
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
- Property svn:mergeinfo changed
/trunk/sources merged: 6201,6205,6207-6209,6223,6233-6241,6250,6252,6254-6256,6259,6262,6265,6291,6298,6302
- Property svn:mergeinfo changed
-
branches/histogram/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
r5942 r6340 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 using HeuristicLab.Data;27 27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Operators;29 using HeuristicLab.Parameters;30 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 using HeuristicLab.Optimization;32 using System;33 29 34 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { … … 150 146 var mainBranch = startNode.GetSubtree(0); 151 147 startNode.RemoveSubtree(0); 152 var scaledMainBranch = MakeSum(MakeProduct( beta, mainBranch), alpha);148 var scaledMainBranch = MakeSum(MakeProduct(mainBranch, beta), alpha); 153 149 startNode.AddSubtree(scaledMainBranch); 154 150 } … … 159 155 return treeNode; 160 156 } else { 161 var node = (new Addition()).CreateTreeNode(); 157 var addition = new Addition(); 158 var node = addition.CreateTreeNode(); 162 159 var alphaConst = MakeConstant(alpha); 163 160 node.AddSubtree(treeNode); … … 167 164 } 168 165 169 private static ISymbolicExpressionTreeNode MakeProduct( double beta, ISymbolicExpressionTreeNode treeNode) {166 private static ISymbolicExpressionTreeNode MakeProduct(ISymbolicExpressionTreeNode treeNode, double beta) { 170 167 if (beta.IsAlmost(1.0)) { 171 168 return treeNode; 172 169 } else { 173 var node = (new Multiplication()).CreateTreeNode(); 170 var multipliciation = new Multiplication(); 171 var node = multipliciation.CreateTreeNode(); 174 172 var betaConst = MakeConstant(beta); 175 173 node.AddSubtree(treeNode);
Note: See TracChangeset
for help on using the changeset viewer.