IterativeThresholdExceedance

class IterativeThresholdExceedance(*args)

Iterative threshold exceedance.

Parameters:
dimensionint, optional

Dimension of the input data, default is 1

operatorComparisonOperator, optional

Comparison operator, default is Greater

thresholdfloat, optional

Threshold value, default is 0.0

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

getIterationNumber()

Get the current iteration of the algorithm

getName()

Accessor to the object's name.

getRatio()

Returns the ratio of threshold exceedances per iteration

getThresholdExceedance()

Returns the number of threshold exceedances per component

getThresholdValue()

Returns the value of the threshold

hasName()

Test if the object is named.

increment(*args)

Increment the internal data.

setName(name)

Accessor to the object's name.

__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

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.

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.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

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.

Examples using the class

Estimate threshold exceedance iteratively

Estimate threshold exceedance iteratively