Changeset 7233


Ignore:
Timestamp:
12/25/11 20:52:38 (11 years ago)
Author:
gkronber
Message:

#1685:

  • fixed bug in simplification view for discriminating function classification solutions (incorrect threshold calculation was used)
  • fixed bug in linear discriminant analysis algorithm (an additional constant term was added to the model incorrectly)
Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs

    r6649 r7233  
    100100      }
    101101
    102       ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode();
    103       cNode.Value = w[w.Length - 1];
    104       addition.AddSubtree(cNode);
    105 
    106 
    107102      var model = LinearDiscriminantAnalysis.CreateDiscriminantFunctionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter(), problemData, rows);
    108103      SymbolicDiscriminantFunctionClassificationSolution solution = new SymbolicDiscriminantFunctionClassificationSolution(model, (IClassificationProblemData)problemData.Clone());
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs

    r7027 r7233  
    8181      double[] thresholds;
    8282      // normal distribution cut points are used as thresholds here because they are a lot faster to calculate than the accuracy maximizing thresholds
    83       NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(Content.ProblemData, originalOutput, targetClassValues, out classValues, out thresholds);
     83      AccuracyMaximizationThresholdCalculator.CalculateThresholds(Content.ProblemData, originalOutput, targetClassValues, out classValues, out thresholds);
    8484      var classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter);
    8585      classifier.SetThresholdsAndClassValues(thresholds, classValues);
     
    9696          .LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit)
    9797          .ToArray();
    98         NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(Content.ProblemData, newOutput, targetClassValues, out classValues, out thresholds);
     98        AccuracyMaximizationThresholdCalculator.CalculateThresholds(Content.ProblemData, newOutput, targetClassValues, out classValues, out thresholds);
    9999        classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter);
    100100        classifier.SetThresholdsAndClassValues(thresholds, classValues);
Note: See TracChangeset for help on using the changeset viewer.