IterativeThresholdExceedance

class IterativeThresholdExceedance(*args)

Iterative threshold exceedance.

Parameters
dimensionint, default=1

Dimension of the input data

thresholdValuefloat, default=0.0

Threshold value

Notes

This class iteratively counts the number of threshold exceedances of an iteratively increasing dataset without storing any data in memory.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> dim = 5
>>> threshold = 0.5
>>> myThresholdExceedance = ot.IterativeThresholdExceedance(dim, threshold)
>>> n = ot.Normal(dim)
>>> size = 50

Increment with 50 points:

>>> for i in range(size):
...     point = n.getRealization()
...     myThresholdExceedance.increment(point)
>>> print(myThresholdExceedance.getThresholdExceedance())
[14,14,14,17,12]
>>> print(myThresholdExceedance.getIterationNumber())
50

Increment with one sample of size 50:

>>> sample = n.getSample(size)
>>> myThresholdExceedance.increment(sample)
>>> print(myThresholdExceedance.getIterationNumber())
100
>>> print(myThresholdExceedance.getThresholdExceedance())
[38,30,35,27,32]

Methods

getClassName()

Accessor to the object's name.

getDimension()

Get the dimension of the algorithm

getId()

Accessor to the object's id.

getIterationNumber()

Get the current iteration of the algorithm

getName()

Accessor to the object's name.

getShadowedId()

Accessor to the object's shadowed id.

getThresholdExceedance()

Returns the number of threshold exceedances component per component

getThresholdValue()

Returns the value of the threshold

getVisibility()

Accessor to the object's visibility state.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

increment(*args)

Increment the internal data.

setName(name)

Accessor to the object's name.

setShadowedId(id)

Accessor to the object's shadowed id.

setVisibility(visible)

Accessor to the object's visibility state.

__init__(*args)
getClassName()

Accessor to the object’s name.

Returns
class_namestr

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

getDimension()

Get the dimension of the algorithm

Returns
dimensionint

Dimension of the algorithm

getId()

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getIterationNumber()

Get the current iteration of the algorithm

Returns
iterationint

Current iteration of the algorithm

getName()

Accessor to the object’s name.

Returns
namestr

The name of the object.

getShadowedId()

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getThresholdExceedance()

Returns the number of threshold exceedances component per component

Returns
thresholdExceedancePoint

current number of threshold exceedances component per component.

getThresholdValue()

Returns the value of the threshold

Returns
thresholdValuefloat

the value of the threshold.

getVisibility()

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

True if the name is not empty and not the default one.

increment(*args)

Increment the internal data.

Parameters
datasequence of float or 2-d sequence of float

New input point or sample.

setName(name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.