Sampler¶
- class probly.representer.sampler.Sampler(predictor: RandomPredictor[In, Out], num_samples: int, sampling_strategy: SamplingStrategy = 'sequential', sample_factory: SampleFactory[Out, S] = <flextype.singledispatch.Flexdispatch object>, sample_axis: int = -1)[source]¶
Bases:
IterableSampler[In,Out,S],Generic[In,Out,S]A representation predictor that creates representations from finite samples.
Initialize the sampler.
- Parameters:
predictor – The predictor to be used for sampling.
num_samples – The number of samples to draw.
sampling_strategy – How the samples should be computed.
sample_factory – Factory to create the sample.
sample_axis – The axis along which samples are organized.
- 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_factory: SampleFactory¶
- sampling_strategy: SamplingStrategy¶