com.quantarray.anaheim.numerics.Z.scala Maven / Gradle / Ivy
package com.quantarray.anaheim.numerics
/**
* Standard score.
*/
final case class Z(mean: Double, standardDeviation: Double) {
def scoreOf(x: Double): Double = (x - mean) / standardDeviation
def scoresOf(xs: Seq[Double]): Seq[Double] = xs.map(scoreOf)
}