Changeset 8727 for trunk/sources
- Timestamp:
- 10/04/12 11:25:12 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicClassificationSolutionSimplifierViewBase.cs
r8637 r8727 118 118 var interpreter = Content.Model.Interpreter; 119 119 var rows = Content.ProblemData.TrainingIndices; 120 return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows).Median(); 120 return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows) 121 .LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit).Median(); 121 122 } 122 123 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs
r8704 r8727 70 70 Dictionary<ISymbolicExpressionTreeNode, double> impactValues = new Dictionary<ISymbolicExpressionTreeNode, double>(); 71 71 List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList(); 72 var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows) 73 .ToArray(); 72 var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows).LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit).ToArray(); 74 73 var targetValues = dataset.GetDoubleValues(targetVariable, rows); 75 74 OnlineCalculatorError errorState; … … 82 81 ISymbolicExpressionTreeNode replacementNode = constantNode; 83 82 SwitchNode(parent, node, replacementNode); 84 var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows) ;83 var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows).LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit); 85 84 double newR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, newOutput, out errorState); 86 85 if (errorState != OnlineCalculatorError.None) newR2 = 0.0; … … 107 106 var interpreter = Content.Model.Interpreter; 108 107 var rows = Content.ProblemData.TrainingIndices; 109 return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows).Median(); 108 return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows) 109 .LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit) 110 .Median(); 110 111 } 111 112
Note: See TracChangeset
for help on using the changeset viewer.