Changeset 8531 for trunk/sources/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 08/28/12 13:11:15 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs
r8139 r8531 51 51 valueEvaluationCache = new Dictionary<int, double>(); 52 52 classValueEvaluationCache = new Dictionary<int, double>(); 53 54 SetAccuracyMaximizingThresholds();55 53 } 56 54 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
r8139 r8531 96 96 protected override void OnModelChanged() { 97 97 DeregisterEventHandler(); 98 SetAccuracyMaximizingThresholds();99 98 RegisterEventHandler(); 100 99 base.OnModelChanged(); … … 137 136 } 138 137 139 public void SetAccuracyMaximizingThresholds() {140 double[] classValues;141 double[] thresholds;142 var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);143 AccuracyMaximizationThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);144 145 Model.SetThresholdsAndClassValues(thresholds, classValues);146 }147 148 public void SetClassDistibutionCutPointThresholds() {149 double[] classValues;150 double[] thresholds;151 var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);152 NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);153 154 Model.SetThresholdsAndClassValues(thresholds, classValues);155 }156 157 138 protected virtual void OnModelThresholdsChanged(EventArgs e) { 158 139 CalculateResults();
Note: See TracChangeset
for help on using the changeset viewer.