Class/Object

infcalcs.tables

CTable

Related Docs: object CTable | package tables

Permalink

abstract class CTable[A] extends AnyRef

A mixin for implementing contingency tables.

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

Instance Constructors

  1. new CTable()(implicit n: Numeric[A])

    Permalink

Abstract Value Members

  1. abstract val cols: Int

    Permalink

    The number of columns in the table.

  2. abstract val rows: Int

    Permalink

    The number of rows in the table.

  3. abstract val table: Vector[Vector[A]]

    Permalink

    The table of counts, as a matrix of integers.

Concrete 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. def apply(s: String): Double

    Permalink

    Makes CTable callable, retrieving values according to String keys in ctVals

    Makes CTable callable, retrieving values according to String keys in ctVals

    s

    string present in ctVals' keys

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. lazy val cTableWithDoubles: ContingencyTable[Double]

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. lazy val condColEntropy: Double

    Permalink

    Conditional entropy of the column variable, H(Col|Row).

  9. def condEntropy(t: Vector[Vector[A]]): Double

    Permalink

    Returns the conditional entropy of a 2D table (rows conditioned on cols).

    Returns the conditional entropy of a 2D table (rows conditioned on cols).

    For a contingency table for two random variables X = {x1, x2, x3 ...} and Y = {y1, y2, y3 ...}, of the form

    |    y1  y2  y3 ...
    | x1  .   .   . ...
    | x2  .   .   . ...
    | x3  .   .   . ...
    | ...

    this function calculates the entropy of the row variable X conditional on the column variable Y, H(X|Y).

    t

    2-dimensional vector of integer vectors

    returns

    conditional entropy

  10. lazy val condRowEntropy: Double

    Permalink

    Conditional entropy of the row variable, H(Row|Col).

  11. lazy val ctVals: Map[String, Double]

    Permalink

    Map of strings to various CTable values

  12. def eTerm(prob: Double): Double

    Permalink

    Calculates an entropy term from a probability.

    Calculates an entropy term from a probability.

    Note that this function returns the term p*log2(p) for a probability p, which is always negative. Callers of this function must therefore take the negative of sums of entropies calculated using this function, as the definition of entropy is E[-log(P(X)].

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

    Permalink
    Definition Classes
    AnyRef
  14. def equals(ct: Any): Boolean

    Permalink

    Checks two contingency tables for equality.

    Checks two contingency tables for equality.

    Definition Classes
    CTable → AnyRef → Any
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def generateCtPos(rand: Boolean = false): List[CtPos]

    Permalink

    Converts the probability table to a list of CtPos instances for sorting by probability

  17. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  20. lazy val jointProbTable: Vector[Vector[Double]]

    Permalink

    table entries as frequencies

  21. def mapNegSum[T](f: (T) ⇒ Double): (TraversableOnce[T]) ⇒ Double

    Permalink

    Higher order function that returns a function for calculating the negated sum of a numerical data set that has a another function applied to it

    Higher order function that returns a function for calculating the negated sum of a numerical data set that has a another function applied to it

    f

    function to apply to numerical data

    returns

    function which applies f to a data set and calculates the negation of the resulting sum

  22. lazy val margColEntropy: Double

    Permalink

    Marginal entropy of the column variable.

  23. def margEntFunc: (Vector[A]) ⇒ Double

    Permalink

    Composition to produce marginal entropy function

  24. def margEntropy(t: Vector[Vector[A]]): Double

    Permalink

    Returns the marginal entropy (marginalized across columns) of a 2D table.

    Returns the marginal entropy (marginalized across columns) of a 2D table.

    For a contingency table for two random variables X = {x1, x2, x3 ...} and Y = {y1, y2, y3 ...}, of the form

    |    y1  y2  y3 ...
    | x1  .   .   . ...
    | x2  .   .   . ...
    | x3  .   .   . ...
    | ...

    this function calculates the marginal entropy of the row variable X, H(X).

    t

    2-dimensional vector of integer vectors

    returns

    marginal entropy

  25. lazy val margRowEntropy: Double

    Permalink

    Marginal entropy of the row variable.

  26. lazy val mutualInformation: Double

    Permalink

    Mutual information calculated via entropies.

    Mutual information calculated via entropies.

    Since mutual information is symmetric, it can be calculated either in terms of the row variable or the column variable (here it is calculated in terms of the row variable).

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

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

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

    Permalink
    Definition Classes
    AnyRef
  30. val numSamples: A

    Permalink

    The total number of samples (the sum of all counts in the table).

    The total number of samples (the sum of all counts in the table).

    Note: depending on the weighting scheme being used, this number may be 0, leading to NaN in output.

  31. def probVect: (Vector[A]) ⇒ Double

    Permalink

    Converts a vector of counts to a marginal probability.

    Converts a vector of counts to a marginal probability.

    Takes the sum of all counts in the vector and divides by the total number of samples in the table to give the probability of observing any of the events tabulated in that vector.

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

    Permalink
    Definition Classes
    AnyRef
  33. def tableToFile(f: String): Unit

    Permalink

    Writes a contingency table to a file (with space-delimited columns).

  34. lazy val tableWithDoubles: Vector[Vector[Double]]

    Permalink

    table with doubles

  35. def toString(): String

    Permalink

    Pretty-prints contingency table to string

    Pretty-prints contingency table to string

    Definition Classes
    CTable → AnyRef → Any
  36. lazy val transferEfficiency: Double

    Permalink

    The transfer efficiency is the amount of information transmitted, normalized by the maximum possible information transfer, ie, the marginal entropy of the input distribution.

  37. lazy val ttable: Vector[Vector[A]]

    Permalink

    The table of counts, transposed.

  38. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped