Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/10/17 17:16:07 (7 years ago)
Author:
pfleck
Message:

#1666

  • Moved CalculateImpactAndReplacementValues into base-class.
  • Use SymRegImpactCalculator for SymTimeSeriesPrognosis.
  • Unified CalculateImpactAndReplacementValues for all SimplifierViews.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SimplifierViewsProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicClassificationSolutionSimplifierViewBase.cs

    r14826 r15321  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    2523using HeuristicLab.Common;
    2624using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3432      get { return (ISymbolicClassificationSolution)base.Content; }
    3533      set { base.Content = value; }
     34    }
     35
     36    protected override ISymbolicDataAnalysisSolutionImpactValuesCalculator ImpactCalculator {
     37      get { return calculator; }
    3638    }
    3739
     
    6062    }
    6163
    62     protected override Dictionary<ISymbolicExpressionTreeNode, Tuple<double, double>> CalculateImpactAndReplacementValues(ISymbolicExpressionTree tree) {
    63       var impactAndReplacementValues = new Dictionary<ISymbolicExpressionTreeNode, Tuple<double, double>>();
    64       foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix()) {
    65         double impactValue, replacementValue, newQualityForImpactsCalculation;
    66         calculator.CalculateImpactAndReplacementValues(Content.Model, node, Content.ProblemData, Content.ProblemData.TrainingIndices, out impactValue, out replacementValue, out newQualityForImpactsCalculation);
    67         impactAndReplacementValues.Add(node, new Tuple<double, double>(impactValue, replacementValue));
    68       }
    69       return impactAndReplacementValues;
    70     }
    71 
    7264    protected override void btnOptimizeConstants_Click(object sender, EventArgs e) {
    7365
Note: See TracChangeset for help on using the changeset viewer.