patternMatchVariance

fun patternMatchVariance(counters: IntArray, pattern: IntArray, maxIndividualVariance: Float): Float

Determines how closely a set of observed counts of runs of black/white values matches a given target pattern. This is reported as the ratio of the total variance from the expected pattern proportions across all pattern elements, to the length of the pattern.

Return

ratio of total variance between counters and pattern compared to total pattern size

Parameters

counters

observed counters

pattern

expected pattern

maxIndividualVariance

The most any counter can differ before we give up