Changeset 13182 for stable/HeuristicLab.Problems.DataAnalysis.Symbolic
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12839
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 12839
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12669 r13182 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.