Changeset 12689 for branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4
- Timestamp:
- 07/08/15 15:32:12 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs
r12012 r12689 60 60 List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList(); 61 61 OnlineCalculatorError errorState; 62 double originalR 2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput, out errorState);63 if (errorState != OnlineCalculatorError.None) originalR 2= 0.0;62 double originalR = OnlinePearsonsRCalculator.Calculate(targetValues, originalOutput, out errorState); 63 if (errorState != OnlineCalculatorError.None) originalR = 0.0; 64 64 65 65 foreach (ISymbolicExpressionTreeNode node in nodes) { … … 69 69 SwitchNode(parent, node, replacementNode); 70 70 var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows); 71 double newR 2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, newOutput, out errorState);72 if (errorState != OnlineCalculatorError.None) newR 2= 0.0;71 double newR = OnlinePearsonsRCalculator.Calculate(targetValues, newOutput, out errorState); 72 if (errorState != OnlineCalculatorError.None) newR = 0.0; 73 73 74 74 // impact = 0 if no change 75 75 // impact < 0 if new solution is better 76 76 // impact > 0 if new solution is worse 77 double impact = originalR2 - newR2;77 double impact = (originalR*originalR) - (newR*newR); 78 78 impactAndReplacementValues[node] = new Tuple<double, double>(impact, constantNode.Value); 79 79 SwitchNode(parent, replacementNode, node);
Note: See TracChangeset
for help on using the changeset viewer.