trait DiscreteDistributions extends Distributions
This trait implements some standard discrete distributions.
- Self Type
- DiscreteDistributions
- Alphabetic
- By Inheritance
- DiscreteDistributions
- Distributions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
randomGenerator: RandomGenerator
- Attributes
- protected
- Definition Classes
- Distributions
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
choose[A](distribution: Seq[(A, Prob)])(implicit ev: (DenseVector[Double]) ⇒ QuasiTensor[Int, Double], sumImpl: breeze.linalg.sum.Impl[DenseVector[Double], Double]): Stochastic[A]
Creates a random variable that samples from the discrete distribution given as input.
Creates a random variable that samples from the discrete distribution given as input.
- A
the concrete type of the random variable
- distribution
a discrete distribution given as a (finite) sequence of (value, probability) pairs
- ev
Breeze internals
- sumImpl
Breeze internals
- returns
a random variable that samples from the discrete distribution given as input
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
coin: Stochastic[Boolean]
See coin.
-
def
coin(p: Prob = 0.5): Stochastic[Boolean]
Creates a Bernoulli random variable.
Creates a Bernoulli random variable.
- p
the probability of a positive outcome
- returns
a Bernoulli random variable
-
def
constant[A](a: A): Stochastic[A]
Creates a random variable that is constant.
Creates a random variable that is constant.
- A
the concrete type of this random variable
- a
the value of this constant random variable
- returns
a constant random variable
- Definition Classes
- Distributions
-
def
discreteUniform(n: Int): Stochastic[Int]
Creates a random variable that samples uniformly from
0tonexcluded.Creates a random variable that samples uniformly from
0tonexcluded.- n
the number of values that the random variables can take
- returns
a random variable that samples uniformly from
0tonexcluded
-
def
discreteUniform[A](values: Seq[A]): Stochastic[A]
Creates a random variable that samples uniformly from the values given as input.
Creates a random variable that samples uniformly from the values given as input.
- A
the concrete type of the random variable
- values
values from which to sample
- returns
a random variable that samples uniformly from the values given as input
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromMass(mass: Seq[Prob]): Stochastic[Int]
Creates a random variable that samples from the first natural numbers with probabilities given by
mass.Creates a random variable that samples from the first natural numbers with probabilities given by
mass.- mass
a discrete distribution on the first natural numbers given as probabilities
- returns
a random variable that samples from the first natural numbers with probabilities given by
mass
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )