pastas.model.Model.solve ======================== .. py:method:: pastas.model.Model.solve(tmin: pandas.Timestamp | str | None = None, tmax: pandas.Timestamp | str | None = None, freq: str | None = None, warmup: float | None = None, noise: bool | None = None, solver: pastas.typing.Solver | None = None, report: bool | Literal['full'] = True, initial: bool = True, weights: pandas.Series | None = None, fit_constant: bool = True, freq_obs: str | None = None, initialize: bool = True, **kwargs) -> None Method to solve the time series model. :param tmin: 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. :type tmin: pandas.Timestamp or str, optional :param tmax: 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. :type tmax: pandas.Timestamp or str, optional :param freq: 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". :type freq: str, optional :param warmup: Warmup period (in Days) for which the simulation is calculated, but not used for the calibration period. :type warmup: float, optional :param noise: This argument is deprecated and will be removed in Pastas version 2.0.0. To solve using a noisemodel (i.e. noise=True), add a noisemodel to the model using ml.add_noisemodel(n), where n is an instance of a noisemodel (e.g., n = ps.ArNoiseModel()). To solve without a noisemodel (noise=False), remove the noisemodel first (if present) using ml.del_noisemodel(). :type noise: bool, optional :param solver: Instance of a pastas Solver class used to solve the model. Options are: ps.LeastSquares() (default) or ps.LmfitSolve(). An instance is needed as of Pastas 0.23, not a class! :type solver: Class pastas.solver.Solver, optional :param report: Print a report to the screen after optimization finished. Set to True (default) to print a standard report, "full" to print a report including the correlation matrix and standard errors of the parameters, or False to suppress the report. This can also be manually triggered after optimization by calling print(ml.fit_report( )) on the Pastas model instance. :type report: bool | Literal["full"], optional :param initial: Reset initial parameters from the individual stress models. Default is True. If False, the optimal values from an earlier optimization are used. :type initial: bool, optional :param weights: Pandas Series with values by which the residuals or noise time series are multiplied, index-based. Must have the same indices as the oseries. If None, equal weights are used. This can be used to put extra/less weight on certain periods (e.g., droughts) or measurements (i.e. outliers), and make more complex calibration schemes (see, for example, :cite:`colllenteur_analysis_2023`). Note that the weights are only used during optimization and not when computing the goodness-of-fit metrics. :type weights: pandas.Series, optional :param fit_constant: 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. :type fit_constant: bool, optional :param freq_obs: 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. :type freq_obs: str, optional :param initialize: If True, the model is initialized via the Model.initialize() method (setting certain model settings) before solving. If False, the model is not initialized before solving. Note that the latter is an advanced option since some model settings can be missing. Default is True. :type initialize: bool, optional :param \*\*kwargs: All keyword arguments will be passed onto minimization method from the solver. It depends on the solver used which arguments can be used. :type \*\*kwargs: dict, optional .. rubric:: Notes - The solver instance including some results are stored as ml.solver. From here one can access the covariance (ml.solver.pcov) and correlation matrix ( ml.solver.pcor). - Each solver returns a number of results after optimization. These solver specific results are stored in ml.solver.result and can be accessed from there. .. seealso:: :py:obj:`pastas.solver` Different solver objects are available to estimate parameters. .. !! processed by numpydoc !!