MCPcopy Index your code
hub / github.com/gonum/plot / coverage

Function coverage

labelling.go:220–225  ·  view source on GitHub ↗

coverage returns the coverage score for based on the average squared distance between the extreme labels, lMin and lMax, and the extreme data points, dMin and dMax.

(dMin, dMax, lMin, lMax float64)

Source from the content-addressed store, hash-verified

218// squared distance between the extreme labels, lMin and lMax, and
219// the extreme data points, dMin and dMax.
220func coverage(dMin, dMax, lMin, lMax float64) float64 {
221 r := 0.1 * (dMax - dMin)
222 max := dMax - lMax
223 min := dMin - lMin
224 return 1 - 0.5*(max*max+min*min)/(r*r)
225}
226
227// maxCoverage returns the maximum coverage achievable for the data
228// range.

Callers 1

talbotLinHanrahanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected