MCPcopy Create free account
hub / github.com/WinVector/Logistic / relDiff

Method relDiff

test/com/winvector/logistic/TestLRPathPlus.java:75–82  ·  view source on GitHub ↗
(double a, double b)

Source from the content-addressed store, hash-verified

73 }
74
75 private double relDiff(double a, double b) {
76 final double diff = Math.abs(a-b);
77 if(diff<=0.0) {
78 return 0.0;
79 } else {
80 return 2.0*diff/(Math.abs(a)+Math.abs(b));
81 }
82 }
83
84 /**
85 * essentially the same loop structure as VariableEncodings.formatSoln. So double calculating here confirms

Callers 2

confirmEffectCalcMethod · 0.95
testVectorEncodingBMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected