FrozenStdExtrapolation

class arithmeticmeancurve.FrozenStdExtrapolation(use_previous_iteration: bool = True, maximum_allowed_iterations: Optional[int] = None, target_threshold: Optional[float] = None)

Extrapolates with last standard deviation as target. The current default extrapolation method of the ArithmeticMeanCurve.

Notes

By default the mean value curve is calculated until the relative deviation of the mean curve in regard of the previous iteration step’s mean value is 0.01% (figure 1). For more precise values the target_threshold can be lowered.

For a faster calculation the previous row’s result is used as the entry point for the next calculation. It can be disabled via the argument use_previous_iteration.

Parameters
  • use_previous_iteration (bool) – Default True; indicates if the results of the previous calculation are used as starting point within the next one.

  • maximum_allowed_iterations (int) – Default 50; maximum count of iterations of each row’s extrapolation calculation.

  • target_threshold (float) – Default 0.0001 (or 0.01%); the relative deviation, which marks the iterations target. Lowering this value might need an increase of maximum_allowed_iterations.

Examples

The default extrapolation is tweaked comparing figure 1 with figure 2.

(Source code, png, hires.png, pdf)

../_images/arithmeticmeancurve-FrozenStdExtrapolation-1.png

Figure 1: Extrapolation with default settings. Top diagram; iteration per extrapolated row (abscissa number). Bottom diagram; Original and extrapolated curves.

(Source code, png, hires.png, pdf)

../_images/arithmeticmeancurve-FrozenStdExtrapolation-2.png

Figure 2: Extrapolation with use_previous_iteration turned off. Top diagram; iteration per extrapolated row (abscissa number). Bottom diagram; Original and extrapolated curves.