Copyright | (c) 2017 Gregory W. Schwartz |
---|---|

License | BSD3 |

Maintainer | gsch@mail.med.upenn.edu |

Stability | experimental |

Portability | portable |

Safe Haskell | None |

Language | Haskell98 |

Functions for normalizing samples.

# Documentation

standardize :: Vector v Double => v Double -> Maybe (v Double) #

*O(n)* Normalize a sample using standard scores:

\[ z = \frac{x - \mu}{\sigma} \]

Where μ is sample mean and σ is standard deviation computed from
unbiased variance estimation. If sample to small to compute σ or
it's equal to 0 `Nothing`

is returned.