Changeset 15371 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4
- Timestamp:
- 09/19/17 10:49:02 (7 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views
- Property svn:mergeinfo changed
/branches/SimplifierViewsProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views (added) merged: 15318,15321,15353
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicClassificationSolutionSimplifierViewBase.cs
r14826 r15371 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 29 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views { 30 27 public abstract partial class InteractiveSymbolicClassificationSolutionSimplifierViewBase : InteractiveSymbolicDataAnalysisSolutionSimplifierView { 31 private readonly SymbolicClassificationSolutionImpactValuesCalculator calculator;32 33 28 public new ISymbolicClassificationSolution Content { 34 29 get { return (ISymbolicClassificationSolution)base.Content; } … … 36 31 } 37 32 38 p ublicInteractiveSymbolicClassificationSolutionSimplifierViewBase()39 : base( ) {33 protected InteractiveSymbolicClassificationSolutionSimplifierViewBase() 34 : base(new SymbolicClassificationSolutionImpactValuesCalculator()) { 40 35 InitializeComponent(); 41 36 this.Caption = "Interactive Classification Solution Simplifier"; 42 43 calculator = new SymbolicClassificationSolutionImpactValuesCalculator();44 37 } 45 38 … … 59 52 return model; 60 53 } 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 }75 54 } 76 55 }
Note: See TracChangeset
for help on using the changeset viewer.