IterableSampler

class probly.representer.sampler.IterableSampler(predictor: IterablePredictor[In, Out], sample_factory: SampleFactory[Out, S] = <flextype.singledispatch.Flexdispatch object>, sample_axis: int = -1)[source]

Bases: Representer[Any, In, Out, S], Generic[In, Out, S]

A sampler that creates representations from ensemble predictions.

Initialize the ensemble sampler.

Parameters:
  • predictor – The ensemble predictor.

  • sample_factory – Factory to create the sample.

  • sample_axis – The axis along which samples are organized.

__call__(*args: In.args, **kwargs: In.kwargs) → R[source]

Alias for the represent method.

predict(*args: In.args, **kwargs: In.kwargs) → R[source]

Predict the representation for a given input.

represent(*args: In.args, **kwargs: In.kwargs) → S[source]

Sample from the ensemble predictor for a given input.

sample_axis: int
sample_factory: SampleFactory

Examples using probly.representer.sampler.IterableSampler

Depth estimation uncertainty with transformers

Depth estimation uncertainty with transformers

Forecast uncertainty with transformers

Forecast uncertainty with transformers

LoRA adapter ensembles with peft

LoRA adapter ensembles with peft

Uncertainty for Hugging Face transformers

Uncertainty for Hugging Face transformers

DARE on Two Moons

DARE on Two Moons

Bayesian Ensemble on Two Moons

Bayesian Ensemble on Two Moons

Bayesian Ensemble on MNIST

Bayesian Ensemble on MNIST

Deep Ensemble on Two Moons

Deep Ensemble on Two Moons

Deep Ensemble on MNIST

Deep Ensemble on MNIST

Sub-Ensemble on Two Moons

Sub-Ensemble on Two Moons

Sub-Ensemble on MNIST

Sub-Ensemble on MNIST