Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs
r5993 r6760 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing;25 24 using System.Linq; 26 using System.Windows.Forms;27 25 using HeuristicLab.Common; 28 using HeuristicLab. MainForm.WindowsForms;26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 27 using HeuristicLab.Problems.DataAnalysis.Symbolic.Views; 30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;31 28 32 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views { … … 54 51 protected override void UpdateModel(ISymbolicExpressionTree tree) { 55 52 Content.Model = new SymbolicDiscriminantFunctionClassificationModel(tree, Content.Model.Interpreter); 53 // the default policy for setting thresholds in classification models is the accuarcy maximizing policy 54 // however for performance reasons we must use estimations of the normal distribution cut points as the thresholds 55 // here and in CalculateImpactValues as they are a lot faster to calculate 56 56 Content.SetClassDistibutionCutPointThresholds(); 57 57 } … … 73 73 List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList(); 74 74 75 var targetClassValues = dataset.Get EnumeratedVariableValues(targetVariable, rows);75 var targetClassValues = dataset.GetDoubleValues(targetVariable, rows); 76 76 var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows) 77 77 .LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit) … … 79 79 double[] classValues; 80 80 double[] thresholds; 81 // normal distribution cut points are used as thresholds here because they are a lot faster to calculate than the accuracy maximizing thresholds 81 82 NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(Content.ProblemData, originalOutput, targetClassValues, out classValues, out thresholds); 82 83 var classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter); … … 115 116 for (int i = 1; i < sourceTree.Root.SubtreesCount; i++) { 116 117 tempTree.Root.AddSubtree((ISymbolicExpressionTreeNode)sourceTree.Root.GetSubtree(i).Clone()); 117 } 118 } 118 119 var start = tempTree.Root.GetSubtree(0); 119 120 while (start.SubtreesCount > 0) start.RemoveSubtree(0); … … 134 135 } 135 136 } 137 138 protected override void btnOptimizeConstants_Click(object sender, EventArgs e) { 139 140 } 136 141 } 137 142 }
Note: See TracChangeset
for help on using the changeset viewer.