Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/21/10 14:51:47 (12 years ago)
Author:
gkronber
Message:

Fixed bugs in views for manual simplification of symbolic models. #1142

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r4462 r4464  
    8585        int samplesStart = Content.ProblemData.TrainingSamplesStart.Value;
    8686        int samplesEnd = Content.ProblemData.TrainingSamplesEnd.Value;
    87         SymbolicExpressionTree tree = (SymbolicExpressionTree)simplifiedExpressionTree.Clone();
    8887        double originalTrainingMeanSquaredError = SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(
    89             Content.Model.Interpreter, tree, Content.LowerEstimationLimit, Content.UpperEstimationLimit,
     88            Content.Model.Interpreter, simplifiedExpressionTree, Content.LowerEstimationLimit, Content.UpperEstimationLimit,
    9089            Content.ProblemData.Dataset, Content.ProblemData.TargetVariable.Value,
    9190            Enumerable.Range(samplesStart, samplesEnd - samplesStart));
     
    9392        this.CalculateReplacementNodes();
    9493
    95         this.CalculateNodeImpacts(tree, tree.Root.SubTrees[0], originalTrainingMeanSquaredError);
     94        this.CalculateNodeImpacts(simplifiedExpressionTree, simplifiedExpressionTree.Root.SubTrees[0], originalTrainingMeanSquaredError);
     95        // show only interesting part of solution
    9696        this.treeChart.Tree = new SymbolicExpressionTree(simplifiedExpressionTree.Root.SubTrees[0].SubTrees[0]);
    9797        this.PaintNodeImpacts();
     
    168168        }
    169169      }
     170
     171      // show only interesting part of solution
    170172      this.treeChart.Tree = new SymbolicExpressionTree(simplifiedExpressionTree.Root.SubTrees[0].SubTrees[0]);
    171173
     
    206208        if (treeNode is ConstantTreeNode && replacementNodes.ContainsValue((ConstantTreeNode)treeNode))
    207209          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.DarkOrange;
    208         else
    209           this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.Black;
     210        else {
     211          VisualSymbolicExpressionTreeNode visNode = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
     212          if (visNode != null)
     213            visNode.LineColor = Color.Black;
     214        }
    210215      }
    211216    }
Note: See TracChangeset for help on using the changeset viewer.