pastas.solver.timer.StatTimer#

class pastas.solver.timer.StatTimer(ml: pastas.typing.Model, *args: Any, statistic: Literal['rmse', 'sse', 'mae', 'rsq', 'evp', 'nse', 'nnse', 'aic', 'aicc', 'bic'] = 'rmse', update_interval: int | None = None, **kwargs: Any)#

StatTimer that updates a user-specified solve statistic every N iterations.

Parameters:
  • ml (pastas.Model) – The model being solved, used to compute residuals.

  • statistic (str, optional) – The statistic to compute and display, by default “rmse”. Must be a valid statistic in pastas.stats.metrics that accepts res= as an argument.

  • update_interval (int, optional) – Number of iterations between RMSE updates. If None (default), the RMSE is updated when iteration % number of varying parameters == 0.

Methods#

timer(p[, n])

Update RMSE in the progress bar.