Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/15 13:34:55 (9 years ago)
Author:
gkronber
Message:

#2392: fixed all warnings by using PearsonsRCalculator instead of PearsonsRSquaredCalculator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs

    r12012 r12641  
    6060      List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList();
    6161      OnlineCalculatorError errorState;
    62       double originalR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput, out errorState);
    63       if (errorState != OnlineCalculatorError.None) originalR2 = 0.0;
     62      double originalR = OnlinePearsonsRCalculator.Calculate(targetValues, originalOutput, out errorState);
     63      if (errorState != OnlineCalculatorError.None) originalR = 0.0;
    6464
    6565      foreach (ISymbolicExpressionTreeNode node in nodes) {
     
    6969        SwitchNode(parent, node, replacementNode);
    7070        var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows);
    71         double newR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, newOutput, out errorState);
    72         if (errorState != OnlineCalculatorError.None) newR2 = 0.0;
     71        double newR = OnlinePearsonsRCalculator.Calculate(targetValues, newOutput, out errorState);
     72        if (errorState != OnlineCalculatorError.None) newR = 0.0;
    7373
    7474        // impact = 0 if no change
    7575        // impact < 0 if new solution is better
    7676        // impact > 0 if new solution is worse
    77         double impact = originalR2 - newR2;
     77        double impact = (originalR*originalR) - (newR*newR);
    7878        impactAndReplacementValues[node] = new Tuple<double, double>(impact, constantNode.Value);
    7979        SwitchNode(parent, replacementNode, node);
Note: See TracChangeset for help on using the changeset viewer.