Calculates the relative z-scores.
Returns an array of z-scores, i.e., scores that are standardized to zero mean and unit variance, where mean and variance are calculated from the comparison array.
Parameters : | scores : array_like
compare : array_like
axis : int or None, optional
ddof : int, optional
|
---|---|
Returns : | zscore : array_like
|
Notes
This function preserves ndarray subclasses, and works also with matrices and masked arrays (it uses asanyarray instead of asarray for parameters).
Examples
>>> a = [0.5, 2.0, 2.5, 3]
>>> b = [0, 1, 2, 3, 4]
>>> zmap(a, b)
array([-1.06066017, 0. , 0.35355339, 0.70710678])