TruncatedDistributions.jl Documentation

A Julia package for Truncated Distributions including multi-variate truncated distributions.

For example:

julia> using TruncatedDistributions, PDMats

julia> d = BasicBoxTruncatedMvNormal([2.3,4.3],PDMat([1.0 0.3; 0.3  2.4]),[-1.0, 0.5],[5.2,1.8]);

julia> mean(d)
2-element Vector{Float64}:
 1.930922186217924
 1.3227326677503652

julia> d.state.μ_err
3.457541323608117e-8

Specific Types

Common Types

The key type exposed by this package is TruncatedMvDistribution. It is parameterized by a MultivariateDistribution from Distributions.jl, a TruncationRegion, and an additional type called the TruncatedMvDistributionState.

TruncatedDistributions.TruncationRegionType

A truncation region defines a subset of space to which the distribution is truncated. The basic operation supported is intruncationregion(), which returns true if a vector is inside the truncation region.

source
TruncatedDistributions.TruncatedMvDistributionStateType

A state abstract object representing computed quantities of a truncated multivariate distribution.

Every concrete subtype should expose at least the following two fields.

  • n::Int The length of the distribution
  • tp::Float64 The probability of falling in the truncation region for the non-truncated case.
  • tp_err::Float64 An estimate of the absolute error of the probability tp.

Other subtypes may expose.

  • μ::Vector{Float64} The mean vector.
  • μ_err::Float64 An estimate of the relative error for the mean vector.
  • Σ::PDMat The covariance matrix.
  • Σ_err::Float64 An estimate of the relative error for the covariance matrix.

Further subtypes may expose.

  • moment_dict::Dict{Vector{Int},Float64} A dictionary mapping multivariate moment vectors to estimate quantities.
  • prob_dict A dictionary mapping probability vectors to estimated quantities.
source

Functions

Missing docstring.

Missing docstring for TruncatedMvDistribution{D <: MultivariateDistribution, R <: TruncationRegion}. Check Documenter's build log for details.

Index