Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/28/12 13:11:15 (12 years ago)
Author:
mkommend
Message:

#1919: Refactored calculation of thresholds for SymbolicDiscriminantFunctionClassficationModels and removed the automatic recalculation of thresholds during solution creation.

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  
    5151      valueEvaluationCache = new Dictionary<int, double>();
    5252      classValueEvaluationCache = new Dictionary<int, double>();
    53 
    54       SetAccuracyMaximizingThresholds();
    5553    }
    5654
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs

    r8139 r8531  
    9696    protected override void OnModelChanged() {
    9797      DeregisterEventHandler();
    98       SetAccuracyMaximizingThresholds();
    9998      RegisterEventHandler();
    10099      base.OnModelChanged();
     
    137136    }
    138137
    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 
    157138    protected virtual void OnModelThresholdsChanged(EventArgs e) {
    158139      CalculateResults();
Note: See TracChangeset for help on using the changeset viewer.