Sampler

class Sampler(*args)

Sampler.

Available constructors:
Sampler(aSampler)
Parameters:

aSampler : Sampler

Particular sampler. By default it is a RandomWalkMetropolisHastings.

Notes

A Sampler is an object whose fundamental ability is to produce samples according to a certain distribution.

Examples

>>> import openturns as ot
>>> sampler = ot.Sampler()

Methods

getClassName() Accessor to the object’s name.
getDimension() Get the dimension of the samples generated.
getId() Accessor to the object’s id.
getImplementation(*args) Accessor to the underlying implementation.
getName() Accessor to the object’s name.
getRealization() Return a realization.
getSample(size) Return several realizations.
getVerbose() Tell whether the verbose mode is activated or not.
setName(name) Accessor to the object’s name.
setVerbose(verbose) Set the verbose mode.
__init__(*args)
getClassName()

Accessor to the object’s name.

Returns:

class_name : str

The object class name (object.__class__.__name__).

getDimension()

Get the dimension of the samples generated.

Returns:

dimension : int

Dimension of the samples that the Sampler can generate.

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getImplementation(*args)

Accessor to the underlying implementation.

Returns:

impl : Implementation

The implementation class.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getRealization()

Return a realization.

Returns:

realization : NumericalPoint

A new realization.

getSample(size)

Return several realizations.

Parameters:

size : int, size \leq 0

Number of realizations needed.

Returns:

realizations : NumericalSample

Sequence composed of size new realizations.

getVerbose()

Tell whether the verbose mode is activated or not.

Returns:

isVerbose : bool

The verbose mode is activated if it is True, desactivated otherwise.

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setVerbose(verbose)

Set the verbose mode.

Parameters:

isVerbose : bool

The verbose mode is activated if it is True, desactivated otherwise.