DNNPosterior#
- class obsidian.surrogates.custom_torch.DNNPosterior(values: Tensor)[source]#
Bases:
EnsemblePosterior- __init__(values: Tensor)[source]#
- Parameters:
values – Values of the samples produced by this posterior as a (b) x s x q x m tensor where m is the output size of the model and s is the ensemble size.
Methods
__init__(values)density(value)The probability density (or mass) of the distribution.
quantile(value)Quantile of the ensemble posterior
rsample([sample_shape])Sample from the posterior (with gradients).
rsample_from_base_samples(sample_shape, ...)Sample from the posterior (with gradients) using base samples.
sample([sample_shape])Sample from the posterior without gradients.
Attributes
base_sample_shapeThe base shape of the base samples expected in rsample.
batch_rangeThe t-batch range.
deviceThe torch device of the posterior.
dtypeThe torch dtype of the posterior.
ensemble_sizeThe size of the ensemble
meanThe mean of the posterior as a (b) x n x m-dim Tensor.
varianceThe variance of the posterior as a (b) x n x m-dim Tensor.
weightsThe weights of the individual models in the ensemble.