Returns an accumulator function which incrementally computes a sample Pearson product-moment correlation distance.
mean value
mean value
accumulator function
var accumulator = incrpcorrdist( 2.0, -3.0 );
Returns an accumulator function which incrementally computes a sample Pearson product-moment correlation distance.
accumulator function
var accumulator = incrpcorrdist();
var d = accumulator();
// returns null
d = accumulator( 2.0, 1.0 );
// returns 1.0
d = accumulator( -5.0, 3.14 );
// returns ~2.0
d = accumulator();
// returns ~2.0
If provided input values, the accumulator function returns an updated sample correlation distance. If not provided input values, the accumulator function returns the current sample correlation distance.
Notes
NaN
or a value which, when used in computations, results inNaN
, the accumulated value isNaN
for all future invocations.value
value
updated sample correlation distance