Trait

com.twitter.algebird

CMSCounting

Related Doc: package algebird

Permalink

trait CMSCounting[K, C[_]] extends AnyRef

A trait for CMS implementations that can count elements in a data stream and that can answer point queries (i.e. frequency estimates) for these elements.

Known implementations: CMS, TopCMS.

K

The type used to identify the elements to be counted.

C

The type of the actual CMS that implements this trait.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CMSCounting
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def +(item: K, count: Long): C[K]

    Permalink

    Counts the item count times and returns the result as a new sketch.

  2. abstract def ++(other: C[K]): C[K]

    Permalink

    Returns a new sketch that is the combination of this sketch and the other sketch.

  3. abstract def delta: Double

    Permalink

    Returns the bound on the probability that a query estimate does NOT lie within some small interval (an interval that depends on eps) around the truth.

  4. abstract def eps: Double

    Permalink

    Returns the one-sided error bound on the error of each point query, i.e.

    Returns the one-sided error bound on the error of each point query, i.e. frequency estimate.

  5. abstract def f2: Approximate[Long]

    Permalink

    The second frequency moment is \sum a_i^2, where a_i is the count of the i-th element.

  6. abstract def frequency(item: K): Approximate[Long]

    Permalink

    Returns an estimate of the total number of times this item has been seen in the stream so far.

    Returns an estimate of the total number of times this item has been seen in the stream so far. This estimate is an upper bound.

    It is always true that estimatedFrequency >= trueFrequency. With probability p >= 1 - delta, it also holds that estimatedFrequency <= trueFrequency + eps * totalCount.

  7. abstract def innerProduct(other: C[K]): Approximate[Long]

    Permalink

    Returns an estimate of the inner product against another data stream.

    Returns an estimate of the inner product against another data stream.

    In other words, let a_i denote the number of times element i has been seen in the data stream summarized by this CMS, and let b_i denote the same for the other CMS. Then this returns an estimate of <a, b> = \sum a_i b_i.

    Note: This can also be viewed as the join size between two relations.

    It is always true that actualInnerProduct <= estimatedInnerProduct. With probability p >= 1 - delta, it also holds that estimatedInnerProduct <= actualInnerProduct + eps * thisTotalCount * otherTotalCount.

  8. abstract def maxExactCountOpt: Option[Int]

    Permalink

    An Option parameter about how many exact counts a sparse CMS wants to keep

  9. abstract def totalCount: Long

    Permalink

    Total number of elements counted (i.e.

    Total number of elements counted (i.e. seen in the data stream) so far.

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(item: K): C[K]

    Permalink

    Counts the item and returns the result as a new sketch.

  4. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def depth: Int

    Permalink

    Number of hash functions (also: number of rows in the counting table).

    Number of hash functions (also: number of rows in the counting table). This number is derived from delta.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def f1: Long

    Permalink

    The first frequency moment is the total number of elements in the stream.

  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
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def maxExactCount: Int

    Permalink

    Number of exact counts a sparse CMS wants to keep.

    Number of exact counts a sparse CMS wants to keep. This number is derived from maxExactCountOpt.

  16. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. def width: Int

    Permalink

    Number of counters per hash function (also: number of columns in the counting table).

    Number of counters per hash function (also: number of columns in the counting table). This number is derived from eps.

Inherited from AnyRef

Inherited from Any

Ungrouped