DistributionSample¶
- class probly.representation.distribution.DistributionSample(*args, **kwargs)[source]¶
Bases:
RepresentationSample,GenericSample type for empirical second-order distributions.
- abstractmethod classmethod from_iterable(samples: Iterable[T], weights: Iterable[float] | None = None, *, sample_axis: SampleAxis = 'auto') Self[source]¶
Create an Sample from an iterable of samples.
- Parameters:
samples – The predictions to create the sample from.
weights – The (optional) weights for each sample.
sample_axis – The dimension along which samples are organized.
- Returns:
The created NumpySample.
- classmethod from_sample(sample: Sample[T], *, sample_axis: SampleAxis = 'auto') Self[source]¶
Create a new Sample from an existing Sample.
- Parameters:
sample – The sample to create the new sample from.
sample_axis – The dimension along which samples are organized.
- Returns:
The created Sample.
- sample_space[source]¶
alias of
Distribution
- abstract property samples: Iterable[T]¶
Return an iterator over the samples.