Changeset 12641 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
- Timestamp:
- 07/07/15 13:34:55 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12103 r12641 65 65 66 66 OnlineCalculatorError error; 67 var r 2 = OnlinePearsonsRSquaredCalculator.Calculate(v1, v2, out error);67 var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error); 68 68 69 if (r 2> 1.0)70 r 2= 1.0;69 if (r > 1.0) 70 r = 1.0; 71 71 72 return error == OnlineCalculatorError.None ? r 2: 0;72 return error == OnlineCalculatorError.None ? r*r : 0; 73 73 } 74 74 … … 87 87 88 88 OnlineCalculatorError error; 89 var r 2 = OnlinePearsonsRSquaredCalculator.Calculate(leftValues, rightValues, out error);89 var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error); 90 90 91 if (r 2> 1.0)92 r 2 = 1.0; // sometimes due to fp errors it can happen that the r2is 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) 93 93 94 return error == OnlineCalculatorError.None ? r 2: 0;94 return error == OnlineCalculatorError.None ? r*r : 0; 95 95 } 96 96 }
Note: See TracChangeset
for help on using the changeset viewer.