Skip to content

epymorph.parameter_fitting.utils.params_perturb

Perturb

Perturb(duration: int)

The Perturb class provides methods to apply perturbation to model parameters using different stochastic processes. In this case, a geometric Brownian motion (GBM) is used to perturb a parameter based on volatility and time duration.

Attributes:

  • duration (int) –

    The time duration over which the perturbation is applied.

Parameters:

  • duration (int) –

    The time duration for which the perturbation will be applied.

duration instance-attribute

duration = duration

gbm

gbm(param, volatility: float, rng: Generator) -> float

Applies geometric Brownian motion (GBM) to perturb the given parameter.

Parameters:

  • param (float) –

    The initial parameter value to be perturbed.

  • volatility (float) –

    The volatility factor that affects the degree of perturbation.

Returns:

  • float

    The perturbed parameter after applying GBM.