sealed class Moments extends Product with Serializable
A class to calculate the first five central moments over a sequence of Doubles. Given the first five central moments, we can then calculate metrics like skewness and kurtosis.
m{i} denotes the ith central moment.
This code manually inlines code to make it look like a case class. This is done because we changed the count from a Long to a Double to enable the scale method, which allows exponential decays of moments, but we didn't want to break backwards binary compatibility.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Moments
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(that: Any): Boolean
- Definition Classes
- Moments → Equals
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def copy(c0: Long = count, v1: Double = m1, v2: Double = m2, v3: Double = m3, v4: Double = m4): Moments
- def count: Long
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- Moments → Equals → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- Moments → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def kurtosis: Double
- def m0: Long
- val m0D: Double
- val m1: Double
- val m2: Double
- val m3: Double
- val m4: Double
- def mean: Double
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productArity: Int
- Definition Classes
- Moments → Product
- def productElement(idx: Int): Any
- Definition Classes
- Moments → Product
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def productIterator: Iterator[Any]
- Definition Classes
- Product
- def productPrefix: String
- Definition Classes
- Product
- def scale(z: Double): Moments
Scale all the moments by a constant.
Scale all the moments by a constant. This allows you to use Moments with exponential decay
- def skewness: Double
- def stddev: Double
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Moments → AnyRef → Any
- def totalWeight: Double
- def 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()