pastas.plotting.modelplots.Plotting.diagnostics#
- pastas.plotting.modelplots.Plotting.diagnostics(tmin: pandas.Timestamp | str | None = None, tmax: pandas.Timestamp | str | None = None, figsize: tuple = (10, 5), bins: int = 50, acf_options: dict | None = None, fig: pastas.typing.Figure | None = None, alpha: float = 0.05, **kwargs) pastas.typing.Axes#
Plot a window that helps in diagnosing basic model assumptions.
- Parameters:
tmin (pandas.Timestamp or str, optional) – start time for which to calculate the residuals.
tmax (pandas.Timestamp or str, optional) – end time for which to calculate the residuals.
figsize (tuple, optional) – Tuple with the height and width of the figure in inches.
bins (int optional) – number of bins used for the histogram. 50 is default.
acf_options (dict, optional) – dictionary with keyword arguments that are passed on to pastas.stats.acf.
fig (matplotlib.pyplot.Figure, optional) – Optionally provide a matplotlib.pyplot.Figure instance to plot onto.
alpha (float, optional) – Significance level to calculate the (1-alpha)-confidence intervals.
**kwargs (dict, optional) – Optional keyword arguments, passed on to matplotlib.pyplot.figure method.
- Returns:
axes
- Return type:
Examples
>>> axes = ml.plots.diagnostics()
Notes
This plot assumed that the noise or residuals follow a Normal distribution.
See also
pastas.stats.acfMethod that computes the autocorrelation.
scipy.stats.probplotMethod use to plot the probability plot.