pastas.modelplots.Plotting.diagnostics#

Plotting.diagnostics(tmin=None, tmax=None, figsize=(10, 5), bins=50, acf_options=None, fig=None, alpha=0.05, **kwargs)[source]#

Plot a window that helps in diagnosing basic model assumptions.

Parameters:
  • tmin (str or pandas.Timestamp, optional) – start time for which to calculate the residuals.

  • tmax (str or pandas.Timestamp, 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:

list of matplotlib.axes.Axes

Examples

>>> axes = ml.plots.diagnostics()

Notes

This plot assumed that the noise or residuals follow a Normal distribution.

See also

pastas.stats.acf

Method that computes the autocorrelation.

scipy.stats.probplot

Method use to plot the probability plot.