- Timestamp:
- 08/17/15 16:35:47 (9 years ago)
- Location:
- branches/crossvalidation-2434
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crossvalidation-2434
- Property svn:mergeinfo changed
/trunk/sources merged: 12835-12837,12839,12844-12846,12851,12855,12868
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic (added) merged: 12839
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12641 r12869 67 67 var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error); 68 68 69 if (r > 1.0) 70 r = 1.0; 69 var r2 = error == OnlineCalculatorError.None ? r * r : 0; 71 70 72 return error == OnlineCalculatorError.None ? r*r : 0; 71 if (r2 > 1.0) 72 r2 = 1.0; 73 74 return r2; 73 75 } 74 76 … … 89 91 var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error); 90 92 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) 93 var r2 = error == OnlineCalculatorError.None ? r * r : 0; 93 94 94 return error == OnlineCalculatorError.None ? r*r : 0; 95 if (r2 > 1.0) 96 r2 = 1.0; 97 98 return r2; 95 99 } 96 100 }
Note: See TracChangeset
for help on using the changeset viewer.