case class Stat(count: Long = 0L, mean: Double = Double.NaN, M2: Double = Double.NaN, min: Double = Double.NaN, max: Double = Double.NaN, last: Double = Double.NaN, first: Double = Double.NaN) extends StatTrait[Double] with Product with Serializable
- Source
- stat.scala
- Alphabetic
- By Inheritance
- Stat
- Serializable
- Product
- Equals
- StatTrait
- AnyRef
- Any
- by richDrxAny
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(x: Double): Stat
- def ++(that: Stat): Stat
- def ->[B](y: B): (Stat, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val M2: Double
- def applyIf(t: Boolean, f: (Stat) => Stat): Stat
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def applyIf(t: (Stat) => Boolean)(f: (Stat) => Stat): Stat
better chaining for types
better chaining for types
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bound: Bound[Double]
max and min bound
- def boundFrac(populationFraction: Double): Bound[Double]
use Chebyshev's inequality to build around the specified fraction of data where k = 1/sqrt(1-p) where where p = percentOfPopulation note this better matches unknown distributions of data this calculation also does not require the
erf
calculation if the Gaussian distribution is assumed wp:Standard_deviation wp:Chebyshev%27s_inequality - def boundMost: Bound[Double]
3 sigma bound
- def boundSigma(kSigma: Double): Bound[Double]
bound around the mean by +/- k standard deviations, but don't go beyond the max or min
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val count: Long
- def elementOf(xs: Set[Stat]): Boolean
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def ensuring(cond: (Stat) => Boolean, msg: => Any): Stat
- def ensuring(cond: (Stat) => Boolean): Stat
- def ensuring(cond: Boolean, msg: => Any): Stat
- def ensuring(cond: Boolean): Stat
- def entropy(sigDigits: Int): Double
max Shannon entropy for a Gaussian Note: entropy of zero variance is infinite.
max Shannon entropy for a Gaussian Note: entropy of zero variance is infinite. But rarely is that the case, with Doubles, so use a user defined variance metric url: https://en.wikipedia.org/wiki/Entropy_(information_theory)
- def entropy: Double
max Shannon entropy for a Gaussian Default to a min variance of 16significant digits for floating point double url: https://en.wikipedia.org/wiki/Entropy_(information_theory)
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val first: Double
- def formatted(fmtstr: String): String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isZero: Boolean
- def jsDist(b: Stat): Double
the jsd distance metric includes a sqrt term
- def jsdByKLD(b: Stat): Double
Jensen–Shannon divergence for a Gaussian url: https://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence
- def kld(b: Stat): Double
KL Divergence between two univariate Gaussian's [units of Nats] url: https://en.wikipedia.org/wiki/Normal_distribution
- val last: Double
- val max: Double
- val mean: Double
- lazy val mid: Double
- val min: Double
- def minVariance(sigDigits: Int): Double
min variance where sigDigits on the mean is 1 sigma
- def mu: Double
alias for mean
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nice: String
- def nonZero: Boolean
- def noneIf(f: (Stat) => Boolean): Option[Stat]
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def norm(x: Double): Double
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def optionIf(f: (Stat) => Boolean): Option[Stat]
optionally wrap an object
optionally wrap an object
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def parEquals(that: Stat): Boolean
- def preApply[B](f: (Stat) => B): B
a preApply f => f(a)
a preApply f => f(a)
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def s: Double
alias for standard deviation
- def s2: Double
alias for variance
- def sideEffect(f: (Stat) => Unit): Stat
side effect filter
side effect filter
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def someIf(f: (Stat) => Boolean): Option[Stat]
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- lazy val std: Double
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val thisAny: Stat
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def toKson: String
- def toString(): String
- lazy val variance: Double
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Shadowed Implicit Value Members
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from Stat toany2stringadd[Stat] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(stat: any2stringadd[Stat]).+(other)
- Definition Classes
- any2stringadd
Deprecated Value Members
- def ?>(f: (Stat) => Boolean): Option[Stat]
alias for option if
alias for option if
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) to many symbols are hard to undertand
- def addFast(x: Double): Stat
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) use the Stat batch construtor instead
- lazy val range: Double
- Annotations
- @deprecated
- Deprecated
(Since version v0.1.18) use bound.dist instead
- def |>[B](f: (Stat) => B): B
- Implicit
- This member is added by an implicit conversion from Stat toDrxAny[Stat] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) use
preApply
if you must (symbols are concise without concision)
- def →[B](y: B): (Stat, B)
- Implicit
- This member is added by an implicit conversion from Stat toArrowAssoc[Stat] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.