Changeset 12843 for branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching
- Timestamp:
- 08/11/15 10:11:47 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 23 23 bin 24 24 protoc.exe 25 obj
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12689 r12843 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.