IterativeThresholdExceedance

class IterativeThresholdExceedance(*args)

Iterative threshold exceedance.

Parameters:
dimensionint, default=1

Dimension of the input data

operatorComparisonOperator, default=:class:~openturns.Greater

Comparison operator

thresholdfloat, 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
>>> algo = ot.IterativeThresholdExceedance(dim, ot.Greater(), threshold)
>>> n = ot.Normal(dim)
>>> size = 50

Increment with 50 points:

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

Increment with one sample of size 50:

>>> sample = n.getSample(size)
>>> algo.increment(sample)
>>> print(algo.getIterationNumber())
100
>>> print(algo.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.

getRatio()

Returns the ratio of threshold exceedances per iteration

getShadowedId()

Accessor to the object's shadowed id.

getThresholdExceedance()

Returns the number of threshold exceedances 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.

getRatio()

Returns the ratio of threshold exceedances per iteration

Returns:
ratioPoint

Ratio of threshold exceedances per iteration, per component.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
idint

Internal unique identifier.

getThresholdExceedance()

Returns the number of threshold exceedances per component

Returns:
thresholdExceedancePoint

Number of threshold exceedances 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.

Examples using the class

Estimate threshold exceedance iteratively

Estimate threshold exceedance iteratively