Package

org.hammerlab.magic

stats

Permalink

package stats

Visibility
  1. Public
  2. All

Type Members

  1. case class Runs[K, V](elems: Seq[(K, V)])(implicit evidence$1: Integral[V]) extends Product with Serializable

    Permalink

    Convenience class wrapping a sequence of key-number pairs, used in run-length-encoding in Stats.

  2. case class Samples[K, V](n: V, first: Runs[K, V], numFirst: V, last: Runs[K, V], numLast: V)(implicit evidence$1: Integral[V]) extends Product with Serializable

    Permalink

    Used by Stats to wrap some Runs of elements from the start and end of a dataset.

    Used by Stats to wrap some Runs of elements from the start and end of a dataset.

    K

    arbitrary element type

    V

    Integral type, e.g. Int or Long.

    n

    total number of elements in the dataset.

    first

    Runs of elements from the start of the dataset.

    numFirst

    the number of elements represented by the Runs in first, i.e. the sum of the their values.

    last

    Runs of elements from the end of the dataset.

    numLast

    the number of elements represented by the Runs in last, i.e. the sum of the their values.

  3. case class Stats[K, V](n: V, mean: Double, stddev: Double, mad: Double, samplesOpt: Option[Samples[K, V]], sortedSamplesOpt: Option[Samples[K, V]], percentiles: Seq[(Double, Double)])(implicit evidence$1: Numeric[K], evidence$2: Integral[V]) extends Product with Serializable

    Permalink

    Wrapper for some computed statistics about a dataset of Numeric elements.

    Wrapper for some computed statistics about a dataset of Numeric elements.

    K

    Numeric element type. TODO(ryan): allow this to be non-Numeric.

    V

    Integral value type.

    n

    number of elements in the dataset.

    mean

    mean.

    stddev

    stddev.

    mad

    median absolute deviation (from the median).

    samplesOpt

    "sample" elements; the start and end of the data.

    sortedSamplesOpt

    "sample" elements; the least and greatest elements. If the dataset is already sorted, meaning this would be equivalent to samplesOpt, it is omitted.

    percentiles

    selected percentiles of the dataset.

Value Members

  1. object Runs extends Serializable

    Permalink
  2. object Stats extends Serializable

    Permalink

    Helpers for constructing Stats / computing the statistics that populate a Stats instance.

Ungrouped