Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/18 17:41:20 (7 years ago)
Author:
mkommend
Message:

#2910: Added recalculation of thresholds for IDiscriminantClassificationModels during impact calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs

    r15583 r15871  
    4040        out double impactValue, out double replacementValue, out double newQualityForImpactsCalculation,
    4141        double qualityForImpactsCalculation = double.NaN) {
    42       if (double.IsNaN(qualityForImpactsCalculation))
    43         qualityForImpactsCalculation = CalculateQualityForImpacts(model, problemData, rows);
    4442
    4543      var cloner = new Cloner();
    4644      var tempModel = cloner.Clone(model);
     45
     46      if (double.IsNaN(qualityForImpactsCalculation)) {
     47        qualityForImpactsCalculation = CalculateQualityForImpacts(tempModel, problemData, rows);
     48      }
     49
    4750      var tempModelNode = (ISymbolicExpressionTreeNode)cloner.GetClone(node);
    48 
    4951      var tempModelParentNode = tempModelNode.Parent;
    5052      int i = tempModelParentNode.IndexOfSubtree(tempModelNode);
     
    5456      newQualityForImpactsCalculation = qualityForImpactsCalculation; // initialize
    5557      // try the potentially reasonable replacement values and use the best one
    56       foreach (var repValue in CalculateReplacementValues(node, model.SymbolicExpressionTree, model.Interpreter, problemData.Dataset, problemData.TrainingIndices)) {
     58      foreach (var repValue in CalculateReplacementValues(node, model.SymbolicExpressionTree, model.Interpreter, problemData.Dataset, rows)) {
    5759        tempModelParentNode.RemoveSubtree(i);
    5860
Note: See TracChangeset for help on using the changeset viewer.