Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/15 09:52:09 (9 years ago)
Author:
gkronber
Message:

#2392: merged r12492 and r12641 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs

    r12281 r12669  
    6565
    6666      OnlineCalculatorError error;
    67       var r2 = OnlinePearsonsRSquaredCalculator.Calculate(v1, v2, out error);
     67      var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error);
    6868
    69       if (r2 > 1.0)
    70         r2 = 1.0;
     69      if (r > 1.0)
     70        r = 1.0;
    7171
    72       return error == OnlineCalculatorError.None ? r2 : 0;
     72      return error == OnlineCalculatorError.None ? r*r : 0;
    7373    }
    7474
     
    8787
    8888      OnlineCalculatorError error;
    89       var r2 = OnlinePearsonsRSquaredCalculator.Calculate(leftValues, rightValues, out error);
     89      var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error);
    9090
    91       if (r2 > 1.0)
    92         r2 = 1.0; // sometimes due to fp errors it can happen that the r2 is over 1 (like 1.0000000009)
     91      if (r > 1.0)
     92        r = 1.0; // sometimes due to fp errors it can happen that the correlation is over 1 (like 1.0000000009)
    9393
    94       return error == OnlineCalculatorError.None ? r2 : 0;
     94      return error == OnlineCalculatorError.None ? r*r : 0;
    9595    }
    9696  }
Note: See TracChangeset for help on using the changeset viewer.