eta.util.general.certainty_to_period

certainty_to_period(certainty)[source]

Map a certainty in [0,1] to a period (in seconds) that an expected event should occur within.

The proportion between the period and the quantity -log(1 - certainty) is determined by the global constant EXPECTED_STEP_FAILURE_PERIOD_COEFFICIENT, defined in eta.constants.

Parameters:

certainty (float) – A certainty value in [0,1]

Returns:

The period (in seconds), or infinity if the certainty is 1.

Return type:

float or np.inf