pastas.model.Model.set_settings#

pastas.model.Model.set_settings(tmin: pandas.Timestamp | str | None = None, tmax: pandas.Timestamp | str | None = None, freq: str | None = None, warmup: pandas.Timedelta | float | None = None, fit_constant: bool | None = None, freq_obs: str | None = None) None#

Method to change the model settings.

Parameters:
  • tmin (pandas.Timestamp or str, optional) – A string or pandas.Timestamp with the start date for the simulation period (E.g. ‘1980-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally. If none is provided, the tmin from the oseries is used.

  • tmax (pandas.Timestamp or str, optional) – A string or pandas.Timestamp with the end date for the simulation period (E.g. ‘2020-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally. If none is provided, the tmax from the oseries is used.

  • freq (str, optional) – String with the frequency the stressmodels are simulated. Must be one of the following: (D, h, m, s, ms, us, ns) or a multiple of that e.g. “7D”.

  • warmup (float, optional) – Warmup period (in Days) for which the simulation is calculated, but not used for the calibration period.

  • fit_constant (bool, optional) – Argument that determines if the constant is fitted as a parameter. If it is set to False, the constant is set equal to the mean of the residuals.

  • freq_obs (str, optional) – String with the frequency of the observations that the model will be calibrated on. Must be one of the following (D, h, m, s, ms, us, ns) or a multiple of that e.g. “7D”. Should generally be larger than the frequency of the original observations and the model frequency (freq). If freq_obs is not set, the frequency of the model (freq) will be used.

Notes

This method is used to change the model settings. It is called by the solve method, but can also be triggered manually.