A very simple class wrapping an Iterable and providing basic statistics
like mean and variance.
There is an implicit conversion from a Seq[A] to a Stats[A] imported
with com.github.marklister.collections. So you do not need to do anything
to use this class. Simply use the mean, stdDev or variance
methods on an appropriate sequence:
import com.github.marklister.collections.io._
import com.github.marklister.collections._
Welcome to Scala version 2.10.1 (OpenJDK Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> Seq(1,2,3).mean
res0: Double = 2.0
If you know of a library that performs this function please raise an
issue on GitHub
A very simple class wrapping an
Iterable
and providing basic statistics like mean and variance.There is an implicit conversion from a
Seq[A]
to aStats[A]
imported with com.github.marklister.collections. So you do not need to do anything to use this class. Simply use themean
,stdDev
orvariance
methods on an appropriate sequence:If you know of a library that performs this function please raise an issue on GitHub