Changeset 15321 for branches/SimplifierViewsProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4
- Timestamp:
- 08/10/17 17:16:07 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SimplifierViewsProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs
r15319 r15321 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Threading.Tasks; 25 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 35 34 } 36 35 36 protected override ISymbolicDataAnalysisSolutionImpactValuesCalculator ImpactCalculator { 37 get { return calculator; } 38 } 39 37 40 public InteractiveSymbolicRegressionSolutionSimplifierView() 38 41 : base() { … … 46 49 model.Scale(Content.ProblemData); 47 50 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;60 51 } 61 52
Note: See TracChangeset
for help on using the changeset viewer.