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.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r15319 r15321  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Threading.Tasks;
    2524using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3534    }
    3635
     36    protected override ISymbolicDataAnalysisSolutionImpactValuesCalculator ImpactCalculator {
     37      get { return calculator; }
     38    }
     39
    3740    public InteractiveSymbolicRegressionSolutionSimplifierView()
    3841      : base() {
     
    4649      model.Scale(Content.ProblemData);
    4750      Content.Model = model;
    48     }
    49 
    50 
    51     protected override Dictionary<ISymbolicExpressionTreeNode, Tuple<double, double>> CalculateImpactAndReplacementValues(ISymbolicExpressionTree tree) {
    52       var impactAndReplacementValues = new Dictionary<ISymbolicExpressionTreeNode, Tuple<double, double>>();
    53       foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix()) {
    54         double impactValue, replacementValue, newQualityForImpactsCalculation;
    55         calculator.CalculateImpactAndReplacementValues(Content.Model, node, Content.ProblemData, Content.ProblemData.TrainingIndices, out impactValue, out replacementValue, out newQualityForImpactsCalculation);
    56         Progress.ProgressValue += 1.0 / (tree.Length - 2);
    57         impactAndReplacementValues.Add(node, new Tuple<double, double>(impactValue, replacementValue));
    58       }
    59       return impactAndReplacementValues;
    6051    }
    6152
Note: See TracChangeset for help on using the changeset viewer.