Package

com.stripe.rainier

core

Permalink

package core

Visibility
  1. Public
  2. All

Type Members

  1. final case class Bernoulli(p: Real) extends Discrete with Product with Serializable

    Permalink

    Bernoulli distribution with expectation p

    Bernoulli distribution with expectation p

    p

    The probability of success

  2. final case class Beta(a: Real, b: Real) extends StandardContinuous with Product with Serializable

    Permalink

    A Beta distribution with expectation a/(a + b) and variance ab/((a + b)^2 (1 + a + b)).

  3. final case class BetaBinomial(a: Real, b: Real, k: Real) extends Discrete with Product with Serializable

    Permalink

    A Beta-binomial distribution with expectation a/(a + b) * k

  4. final case class Binomial(p: Real, k: Real) extends Discrete with Product with Serializable

    Permalink

    A Binomial distribution with expectation k*p

    A Binomial distribution with expectation k*p

    p

    The probability of success

    k

    The number of trials

  5. case class BoundedAboveSupport(max: Real = Real.zero) extends Support with Product with Serializable

    Permalink

    A support representing an open-below {r < k} interval.

    A support representing an open-below {r < k} interval.

    max

    The upper bound of the distribution

  6. case class BoundedBelowSupport(min: Real = Real.zero) extends Support with Product with Serializable

    Permalink

    A support representing an open-above {r > k} interval.

    A support representing an open-above {r > k} interval.

    min

    The lower bound of the distribution

  7. case class BoundedSupport(min: Real, max: Real) extends Support with Product with Serializable

    Permalink

    A support representing a bounded (min, max) interval.

  8. final case class Categorical[T](pmf: Map[T, Real]) extends Distribution[T] with Product with Serializable

    Permalink

    A finite discrete distribution

    A finite discrete distribution

    pmf

    A map with keys corresponding to the possible outcomes and values corresponding to the probabilities of those outcomes

  9. trait Continuous extends Distribution[Double]

    Permalink

    A Continuous Distribution, with method param allowing conversion to a RandomVariable.

  10. trait Discrete extends Distribution[Int]

    Permalink
  11. final case class DiscreteConstant(constant: Real) extends Discrete with Product with Serializable

    Permalink

    Discrete Constant (point mass) with expecation constant

    Discrete Constant (point mass) with expecation constant

    constant

    The integer value of the point mass

  12. final case class DiscreteMixture(components: Map[Discrete, Real]) extends Discrete with Product with Serializable

    Permalink

    Discrete Mixture Distribution

    Discrete Mixture Distribution

    components

    Map of Discrete distribution and probabilities

  13. trait Distribution[T] extends AnyRef

    Permalink
  14. trait Generator[T] extends AnyRef

    Permalink

    Generator trait, for posterior predictive distributions to be forwards sampled during sampling

  15. final case class Geometric(p: Real) extends Discrete with Product with Serializable

    Permalink

    Geometric distribution with expectation 1/p

    Geometric distribution with expectation 1/p

    p

    The probability of success

  16. trait Likelihood[T] extends AnyRef

    Permalink
  17. trait LocationScaleFamily extends AnyRef

    Permalink

    Location-scale family distribution

  18. case class Mixture(components: Map[Continuous, Real]) extends Continuous with Product with Serializable

    Permalink
  19. final case class Multinomial[T](pmf: Map[T, Real], k: Real) extends Distribution[Map[T, Int]] with Product with Serializable

    Permalink

    A Multinomial distribution

    A Multinomial distribution

    pmf

    A map with keys corresponding to the possible outcomes of a single multinomial trial and values corresponding to the probabilities of those outcomes

    k

    The number of multinomial trials

  20. final case class NegativeBinomial(p: Real, n: Real) extends Discrete with Product with Serializable

    Permalink

    Negative Binomial distribution with expectation n*p/(1-p)

    Negative Binomial distribution with expectation n*p/(1-p)

    p

    Probability of success

    n

    Total number of failures

  21. final case class Poisson(lambda: Real) extends Discrete with Product with Serializable

    Permalink

    Poisson distribution with expectation lambda

    Poisson distribution with expectation lambda

    lambda

    The mean of the Poisson distribution

  22. sealed trait Predictor[X, L] extends AnyRef

    Permalink

    Predictor class, for fitting data with covariates

  23. class RandomVariable[+T] extends AnyRef

    Permalink

    The main probability monad used in Rainier for constructing probabilistic programs which can be sampled

  24. final case class SBC[T, L](priors: Seq[Continuous], fn: (Seq[Real]) ⇒ (L, Real))(implicit lh: ToLikelihood[L, T], gen: ToGenerator[L, T]) extends Product with Serializable

    Permalink
  25. final case class Scale(a: Real) extends Injection with Product with Serializable

    Permalink

    Class to scale a distribution under multiplication by a positive scale factor.

    Class to scale a distribution under multiplication by a positive scale factor. We assume that (a > 0).

  26. trait ToGenerator[-T, U] extends AnyRef

    Permalink
  27. trait ToLikelihood[L, T] extends AnyRef

    Permalink
  28. final case class Translate(b: Real) extends Injection with Product with Serializable

    Permalink

    Class to translate a distribution by adding a constant.

Value Members

  1. object Beta extends Serializable

    Permalink
  2. object Categorical extends Serializable

    Permalink
  3. object Cauchy extends LocationScaleFamily

    Permalink

    A Cauchy distribution with mode location and scaling relative to standard Cauchy of scale

  4. object Combinatorics

    Permalink

    Combinatoric functions useful in log density calculations.

    Combinatoric functions useful in log density calculations. Note that they all return the log of the function described.

  5. object Continuous

    Permalink
  6. object Discrete

    Permalink
  7. object Distribution

    Permalink
  8. object Exp extends Injection

    Permalink

    Object to exponentiate a distribution.

  9. object Exponential

    Permalink

    An Exponential distribution with expectation 1/rate

  10. object Gamma

    Permalink

    A Gamma distribution with expectation shape*scale and variance shape*scale*scale.

    A Gamma distribution with expectation shape*scale and variance shape*scale*scale. N.B. It is parameterised with *scale* rather than *rate*, as is more typical in statistics texts.

  11. object Generator

    Permalink

    Generator object, for posterior predictive distributions to be forwards sampled during sampling

  12. object Laplace extends LocationScaleFamily

    Permalink

    A Laplace distribution with expectation location and variance 2*scale*scale

  13. object Likelihood

    Permalink
  14. object Log extends Logger

    Permalink
  15. object LogNormal

    Permalink

    A LogNormal distribution representing the exponential of a Gaussian random variable with expectation location and standard deviation scale.

    A LogNormal distribution representing the exponential of a Gaussian random variable with expectation location and standard deviation scale. It therefore has expectation exp(location + scale*scale/2).

  16. object Multinomial extends Serializable

    Permalink
  17. object Normal extends LocationScaleFamily

    Permalink

    A Gaussian distribution with expectation location and standard deviation scale

  18. object Predictor

    Permalink
  19. object RandomVariable

    Permalink

    The main probability monad used in Rainier for constructing probabilistic programs which can be sampled

  20. object SBC extends Serializable

    Permalink
  21. object Support

    Permalink
  22. object ToGenerator

    Permalink
  23. object UnboundedSupport extends Support

    Permalink

    A support representing the whole real line.

  24. object Uniform

    Permalink

    A Uniform distribution over [from,to] with expectation (to-from)/2.

Ungrouped