Packages

object LogProbability

Provides a set of operations for working with probabilities stored as (natural) logs. Operations are named based on logical operations (e.g. probability of a 'and' b) vs. mathematical operations (a * b or a + b).

Most operations perform bounds and argument checking to ensure that nonsensical operations (e.g. divide by zero) don't proceed silently.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LogProbability
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def aOrNotB(a: LogProbability, b: LogProbability): LogProbability

    Computes the probability Pr(A OR not B) = Pr(A) - Pr(B).

    Computes the probability Pr(A OR not B) = Pr(A) - Pr(B). While this could be computed using or(a, not(b)), this form is more efficient and more precise.

  5. def and(values: Array[Double]): LogProbability

    Computes the probability of the given independent events co-occurring: Pr(AB..N) = Pr(A)*Pr(B)*...*Pr(N).

  6. def and(a: LogProbability, b: LogProbability): LogProbability

    Computes the probability of a and b, where a and b are independent events: Pr(AB) = Pr(A)*Pr(B).

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def expProb(p: LogProbability): Double

    Exponentiates a LogProbability and limits the return to the range 0-1 to gracefully handle probabilities with minor numerical imprecisions.

    Exponentiates a LogProbability and limits the return to the range 0-1 to gracefully handle probabilities with minor numerical imprecisions. If the LogProbability does not represent a probability between 0 and 1 Math.exp should be used instead.

  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fromPhredScore(s: Int): LogProbability

    Takes a phred score and converts it into the natural log of the probability of error.

  14. def fromPhredScore(s: PhredScore): LogProbability

    Takes a phred score and converts it into the natural log of the probability of error.

  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def normalizeByLogProbability(p: LogProbability, divideBy: LogProbability): LogProbability

    Normalizes a probability.

  20. def normalizeByScalar(p: LogProbability, divideBy: Int): LogProbability

    Normalizes a probability.

  21. def not(a: LogProbability): LogProbability

    Returns the probability of Pr(not A) = 1 - Pr(A).

  22. final def notify(): Unit
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  24. def or(values: Array[LogProbability]): LogProbability

    Computes the probability of any of the given independent events occurring: Pr(AB..N) = Pr(A)+Pr(B)+...+Pr(N).

  25. def or(a: LogProbability, b: LogProbability): LogProbability

    Computes the probability of a or b, where a and b are independent events: Pr(A or B) = Pr(A) + Pr(B).

  26. def probabilityOfErrorTwoTrials(prErrorTrialOne: LogProbability, prErrorTrialTwo: LogProbability): LogProbability

    Computes the probability of seeing an error in the base sequence if there are two independent error processes.

    Computes the probability of seeing an error in the base sequence if there are two independent error processes. We sum three terms: 1. the probability of an error in trial one and no error in trial two: Pr(A=Error, B=NoError). 2. the probability of no error in trial one and an error in trial two: Pr(A=NoError, B=Error). 3. the probability of an error in both trials, but when the second trial does not reverse the error in first one, which for DNA (4 bases) would only occur 2/3 times: Pr(A=x->y, B=y->z) * Pr(x!=z | x!=y, y!=z, x,y,z \in {A,C,G,T})

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toLogProbability(value: Double): LogProbability

    Converts the double to log-space.

  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped