Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/19/17 10:49:02 (7 years ago)
Author:
pfleck
Message:

#1666: Merged into trunk

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views

  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicClassificationSolutionSimplifierViewBase.cs

    r14826 r15371  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    2522using HeuristicLab.Common;
    2623using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    2926namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
    3027  public abstract partial class InteractiveSymbolicClassificationSolutionSimplifierViewBase : InteractiveSymbolicDataAnalysisSolutionSimplifierView {
    31     private readonly SymbolicClassificationSolutionImpactValuesCalculator calculator;
    32 
    3328    public new ISymbolicClassificationSolution Content {
    3429      get { return (ISymbolicClassificationSolution)base.Content; }
     
    3631    }
    3732
    38     public InteractiveSymbolicClassificationSolutionSimplifierViewBase()
    39       : base() {
     33    protected InteractiveSymbolicClassificationSolutionSimplifierViewBase()
     34      : base(new SymbolicClassificationSolutionImpactValuesCalculator()) {
    4035      InitializeComponent();
    4136      this.Caption = "Interactive Classification Solution Simplifier";
    42 
    43       calculator = new SymbolicClassificationSolutionImpactValuesCalculator();
    4437    }
    4538
     
    5952      return model;
    6053    }
    61 
    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 
    72     protected override void btnOptimizeConstants_Click(object sender, EventArgs e) {
    73 
    74     }
    7554  }
    7655}
Note: See TracChangeset for help on using the changeset viewer.