Noise Models
We are currently considering three different possible noise models. To understand their difference, consider again how we may have an observation $(x_i, y_i)$, and each $y_i$ may be multi-dimensional. The first question is: Is noise correlated /across/ multiple observations $y_i$ and $y_j$, $i \neq j$?
If there is no correlation between observations, we can use the noise models
UncorrGaussianNoiseModelfor (possibly multivariate) Gaussian noise, andUncorrProductNoiseModelfor univariate noise with arbitrary distributions.
If there is correlation between observations, we can use
CorrGaussianNoiseModeland provide a single multivariate normal distribution.
Noise Models
ProbabilisticParameterEstimators.NoiseModel — TypeNoiseModelAbstract base type for noise models.
Fields:
ProbabilisticParameterEstimators.UncorrGaussianNoiseModel — TypeUncorrGaussianNoiseModel{DT}Model Gaussian noise within observations, but without correlation between observations.
Fields:
noisedistributions::AbstractVector{DT} where DT<:(Union{var"#s1", var"#s5"} where {var"#s1"<:Distributions.Normal, var"#s5"<:Distributions.MvNormal}): A vector of (possibly multivariate) Gaussian noise distributions with typeDT, one for each observation.
ProbabilisticParameterEstimators.UncorrProductNoiseModel — TypeUncorrProductNoiseModel{DT}Model arbitrary noise for univariate observations, without correlation between observations.
Fields:
noisedistributions::AbstractVector{DT} where DT<:Distributions.Distribution{Distributions.Univariate, Distributions.Continuous}: A vector of univariate noise distributions of any kind with typeDT. Can not model correlations within a single observation.
ProbabilisticParameterEstimators.CorrGaussianNoiseModel — TypeCorrGaussianNoiseModel{DT}Model noise possibly correlated between observations with a single large MvNormal.
Utility Functions
ProbabilisticParameterEstimators.mvnoisedistribution — Functionmvnoisedistribution(noisemodel)Construct a samplable noise distribution (e.g. Product or MvNormal).
ProbabilisticParameterEstimators.covmatrix — Functioncovmatrix(noisemodel)Construct a single N by N covariance matrix for flat vector of observations.
May be a special matrix type such as Diagonal or BlockDiagonal, depending on the noise model.
Noise Model Examples
## UncorrGaussianNoiseModel
xs = rand(5)
# one (uni- or multivariate) normal distribution per observation
noises = [MvNormal(zeros(2), I) for _ in eachindex(xs)]
noisemodel = UncorrGaussianNoiseModel(noises)
θtrue = [1.0, 2.0]
ysmeas = f.(xs, [θtrue]) .+ rand.(noises)
## UncorrProductNoiseModel
xs = eachcol(rand(2,30))
# one univariate distribution per observation
productnoise = [truncated(0.1*Normal(), 0, Inf) for _ in 1:length(xs)]
noisemodel = UncorrProductNoiseModel(productnoise)
θtrue = [5., 10]
ysmeas = f.(xs, [θtrue]) .+ rand.(productnoise)
## CorrGaussianNoiseModel
xs = 5 * eachcol(rand(2,30))
n = length(xs)
# one large Gaussian relating all observations
corrnoise = MvNormal(zeros(n), I(n) + 1/5*hermitianpart(rand(n, n)))
noisemodel = CorrGaussianNoiseModel(corrnoise)
θtrue = [5., 10]
ysmeas = f.(xs, [θtrue]) .+ rand(corrnoise)