Class/Object

com.twitter.algebird

Moments

Related Docs: object Moments | package algebird

Permalink

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
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Moments
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Moments(m0: Long, m1: Double, m2: Double, m3: Double, m4: Double)

    Permalink
  2. new Moments(m0D: Double, m1: Double, m2: Double, m3: Double, m4: Double)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def canEqual(that: Any): Boolean

    Permalink
    Definition Classes
    Moments → Equals
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def copy(c0: Long = count, v1: Double = m1, v2: Double = m2, v3: Double = m3, v4: Double = m4): Moments

    Permalink
  8. def count: Long

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Moments → Equals → AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    Moments → AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def kurtosis: Double

    Permalink
  16. def m0: Long

    Permalink
  17. val m0D: Double

    Permalink
  18. val m1: Double

    Permalink
  19. val m2: Double

    Permalink
  20. val m3: Double

    Permalink
  21. val m4: Double

    Permalink
  22. def mean: Double

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def productArity: Int

    Permalink
    Definition Classes
    Moments → Product
  27. def productElement(idx: Int): Any

    Permalink
    Definition Classes
    Moments → Product
  28. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  29. def productPrefix: String

    Permalink
    Definition Classes
    Product
  30. def scale(z: Double): Moments

    Permalink

    Scale all the moments by a constant.

    Scale all the moments by a constant. This allows you to use Moments with exponential decay

  31. def skewness: Double

    Permalink
  32. def stddev: Double

    Permalink
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

    Permalink
    Definition Classes
    Moments → AnyRef → Any
  35. def totalWeight: Double

    Permalink
  36. def variance: Double

    Permalink
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped