breeze.stats.distributions

Type members

Classlikes

case class AliasTable[I](probs: DenseVector[Double], aliases: DenseVector[Int], outcomes: IndexedSeq[I], rand: RandBasis)
case class Bernoulli(p: Double)(implicit rand: RandBasis) extends DiscreteDistr[Boolean] with Moments[Double, Double]

A Bernoulli distribution represents a distribution over weighted coin flips

A Bernoulli distribution represents a distribution over weighted coin flips

Value parameters:
p

the probability of true

Companion:
object
case class Beta(a: Double, b: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf

The Beta distribution, which is the conjugate prior for the Bernoulli distribution

The Beta distribution, which is the conjugate prior for the Bernoulli distribution

Value parameters:
a

the number of pseudo-observations for true

b

the number of pseudo-observations for false

Companion:
object
case class Binomial(n: Int, p: Double)(implicit rand: RandBasis) extends DiscreteDistr[Int] with Moments[Double, Double]

A binomial distribution returns how many coin flips out of n are heads, where numYes is the probability of any one coin being heads.

A binomial distribution returns how many coin flips out of n are heads, where numYes is the probability of any one coin being heads.

Value parameters:
n

is the number of coin flips

p

the probability of any one being true

case class CauchyDistribution(median: Double, scale: Double)(implicit rand: RandBasis) extends ApacheContinuousDistribution

The Cauchy-distribution

The Cauchy-distribution

Companion:
object
case class ChiSquared(k: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf

Chi-Squared distribution with k degrees of freedom.

Chi-Squared distribution with k degrees of freedom.

Companion:
object
trait ContinuousDistr[T] extends Density[T] with Rand[T]

Represents a continuous Distribution. Why T? just in case.

Represents a continuous Distribution. Why T? just in case.

trait Density[T]

Represents an unnormalized probability distribution.

Represents an unnormalized probability distribution.

case class Dirichlet[T, @specialized(Int) I](params: T)(implicit space: EnumeratedCoordinateField[T, I, Double], rand: RandBasis) extends ContinuousDistr[T]

Represents a Dirichlet distribution, the conjugate prior to the multinomial.

Represents a Dirichlet distribution, the conjugate prior to the multinomial.

Companion:
object
object Dirichlet

Provides several defaults for Dirichlets, one for Arrays and one for Counters.

Provides several defaults for Dirichlets, one for Arrays and one for Counters.

Companion:
class
trait DiscreteDistr[T] extends Density[T] with Rand[T]

Represents a discrete Distribution.

Represents a discrete Distribution.

case class Exponential(rate: Double)(implicit basis: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf
Companion:
object
trait ExponentialFamily[D, T]
case class FDistribution(numeratorDegreesOfFreedom: Double, denominatorDegreesOfFreedom: Double) extends ApacheContinuousDistribution

The F-distribution - ratio of two scaled chi^2 variables

The F-distribution - ratio of two scaled chi^2 variables

Companion:
object
case class Gamma(shape: Double, scale: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf

Represents a Gamma distribution. E[X] = shape * scale

Represents a Gamma distribution. E[X] = shape * scale

Companion:
object
case class Gaussian(mu: Double, sigma: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf

Represents a Gaussian distribution over a single real variable.

Represents a Gaussian distribution over a single real variable.

Companion:
object
case class Geometric(p: Double)(implicit rand: RandBasis) extends DiscreteDistr[Int] with Moments[Double, Double]

The Geometric distribution calculates the number of trials until the first success, which happens with probability p.

The Geometric distribution calculates the number of trials until the first success, which happens with probability p.

Companion:
object
case class Gumbel(location: Double, scale: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf
trait HasCdf
trait HasConjugatePrior[Likelihood <: Density[T], T] extends ExponentialFamily[Likelihood, T]

Trait representing conjugate priors. See Dirichlet for an example.

Trait representing conjugate priors. See Dirichlet for an example.

class HypergeometricDistribution(populationSize: Int, numberOfSuccesses: Int, sampleSize: Int) extends ApacheDiscreteDistribution

The Hypergeometric-distribution - ratio of two scaled chi^2 variables

The Hypergeometric-distribution - ratio of two scaled chi^2 variables

Companion:
object
case class InvGamma(shape: Double, scale: Double)(implicit basis: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf
case class Laplace(location: Double, scale: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf

http://en.wikipedia.org/wiki/Laplace_distribution

The Levy-distribution - ratio of two scaled chi^2 variables

The Levy-distribution - ratio of two scaled chi^2 variables

Companion:
object
case class LogNormal(mu: Double, sigma: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf

A log normal distribution is distributed such that log X ~ Normal(\mu, \sigma)

A log normal distribution is distributed such that log X ~ Normal(\mu, \sigma)

Companion:
object
case class Logarthmic(p: Double)(implicit rand: RandBasis) extends DiscreteDistr[Int] with Moments[Double, Double]

The Logarithmic distribution

trait Moments[Mean, Variance]

Interface for distributions that can report on some of their moments

Interface for distributions that can report on some of their moments

case class Multinomial[T, I](params: T)(implicit ev: ConversionOrSubtype[T, QuasiTensor[I, Double]], sumImpl: Impl[T, Double], rand: RandBasis) extends DiscreteDistr[I]

Represents a Multinomial distribution over elements. You can make a distribution over any breeze.linalg.QuasiTensor, which includes DenseVectors and Counters.

Represents a Multinomial distribution over elements. You can make a distribution over any breeze.linalg.QuasiTensor, which includes DenseVectors and Counters.

TODO: I should probably rename this to Discrete or something, since it only handles one draw.

Companion:
object

Provides routines to create Multinomials

Provides routines to create Multinomials

Companion:
class

Represents a Gaussian distribution over a single real variable.

Represents a Gaussian distribution over a single real variable.

case class NegativeBinomial(r: Double, p: Double)(implicit rand: RandBasis) extends DiscreteDistr[Int]

Negative Binomial Distribution

Negative Binomial Distribution

Value parameters:
p

prob of success

r

number of failures until stop

case class Pareto(scale: Double, shape: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf

http://en.wikipedia.org/wiki/Laplace_distribution

trait PdfIsUFunc[U <: UFunc, T, P <: PdfIsUFunc[U, T, P]]
case class Poisson(mean: Double)(implicit rand: RandBasis) extends DiscreteDistr[Int] with Moments[Double, Double]

Represents a Poisson random variable.

Represents a Poisson random variable.

Companion:
object
Companion:
class
class Polya[T, @specialized(Int) I](params: T)(implicit space: MutableEnumeratedCoordinateField[T, I, Double], rand: RandBasis) extends DiscreteDistr[I]

Represents a Polya distribution, a.k.a Dirichlet compound Multinomial distribution see http://en.wikipedia.org/wiki/Multivariate_Polya_distribution

Represents a Polya distribution, a.k.a Dirichlet compound Multinomial distribution see http://en.wikipedia.org/wiki/Multivariate_Polya_distribution

Companion:
object
object Polya
Companion:
class
trait Process[T] extends Rand[T]

A Rand that changes based on previous draws.

A Rand that changes based on previous draws.

A trait for monadic distributions. Provides support for use in for-comprehensions

A trait for monadic distributions. Provides support for use in for-comprehensions

Companion:
object
object Rand extends RandBasis

Provides a number of random generators, with random seed set to some function of system time and identity hashcode of some object

Provides a number of random generators, with random seed set to some function of system time and identity hashcode of some object

Companion:
class
class RandBasis(val generator: RandomGenerator) extends Serializable

Provides standard combinators and such to use to compose new Rands.

Provides standard combinators and such to use to compose new Rands.

Companion:
object
object RandBasis
Companion:
class
case class Rayleigh(scale: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf
case class StudentsT(degreesOfFreedom: Double)(implicit randBasis: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf
Companion:
object

An Apache-compatible RandomGenerator that creates a new RandomGenerator per thread. The thunk should be thread-safe, using atomics or something.

An Apache-compatible RandomGenerator that creates a new RandomGenerator per thread. The thunk should be thread-safe, using atomics or something.

The Triangular-distribution - ratio of two scaled chi^2 variables

The Triangular-distribution - ratio of two scaled chi^2 variables

Companion:
object
case class Uniform(low: Double, high: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf with HasInverseCdf
Companion:
object

The Weibull-distribution - ratio of two scaled chi^2 variables

The Weibull-distribution - ratio of two scaled chi^2 variables

Companion:
object
case class VonMises(mu: Double, k: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double]

Represents a Von Mises distribution, which is a distribution over angles.

Represents a Von Mises distribution, which is a distribution over angles.

Value parameters:
k

is the concentration, which is like 1/gaussian variance

mu

is the mean of the distribution, ~ gaussian mean

Companion:
object
Companion:
class
case class Wald(mean: Double, shape: Double)(implicit rand: RandBasis) extends ContinuousDistr[Double] with Moments[Double, Double]

Also known as the inverse Gaussian Distribution

Also known as the inverse Gaussian Distribution

http://en.wikipedia.org/wiki/Inverse_Gaussian_distribution

The Weibull-distribution - ratio of two scaled chi^2 variables

The Weibull-distribution - ratio of two scaled chi^2 variables

Companion:
object
case class Wishart(df: Double, scale: DenseMatrix[Double])(implicit randBasis: RandBasis) extends ContinuousDistr[DenseMatrix[Double]] with Moments[DenseMatrix[Double], DenseMatrix[Double]]
case class ZipfDistribution(numberOfElements: Int, exponent: Double) extends ApacheDiscreteDistribution