Core Module Documentation

neuralprophet.plot_model_parameters.plot_custom_season(m, comp_name, ax=None, figsize=(10, 6))

Plot any seasonal component of the forecast.

Parameters
  • m (NeuralProphet) – fitted model.

  • comp_name (str) – Name of seasonality component.

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_daily(m, comp_name='daily', quick=True, ax=None, figsize=(10, 6))

Plot the daily component of the forecast.

Parameters
  • m (NeuralProphet) – fitted model.

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • quick (bool) – use quick low-evel call of model. might break in future.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

  • comp_name (str) – Name of seasonality component if previously changed from default ‘daily’.

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_lagged_weights(weights, comp_name, focus=None, ax=None, figsize=(10, 6))

Make a barplot of the importance of lagged inputs.

Parameters
  • weights (np.array) – model weights as matrix or vector

  • comp_name (str) – name of lagged inputs

  • focus (int) – if provided, show weights for this forecast None (default) sum over all forecasts and plot as relative percentage

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_parameters(m, forecast_in_focus=None, weekly_start=0, yearly_start=0, figsize=None)

Plot the parameters that the model is composed of, visually.

Parameters
  • m (NeuralProphet) – fitted model.

  • forecast_in_focus (int) – n-th step ahead forecast AR-coefficients to plot

  • weekly_start (int) – specifying the start day of the weekly seasonality plot. 0 (default) starts the week on Sunday. 1 shifts by 1 day to Monday, and so on.

  • yearly_start (int) – specifying the start day of the yearly seasonality plot. 0 (default) starts the year on Jan 1. 1 shifts by 1 day to Jan 2, and so on.

  • figsize (tuple) – width, height in inches. None (default): automatic (10, 3 * npanel)

Returns

A matplotlib figure.

neuralprophet.plot_model_parameters.plot_scalar_weights(weights, plot_name, focus=None, ax=None, figsize=(10, 6))

Make a barplot of the regressor weights.

Parameters
  • weights (list) – tuples (name, weights)

  • plot_name (string) – name of the plot

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • focus (int) – if provided, show weights for this forecast None (default) plot average

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_trend(m, ax=None, plot_name='Trend', figsize=(10, 6))

Make a barplot of the magnitudes of trend-changes.

Parameters
  • m (NeuralProphet) – fitted model.

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • plot_name (str) – Name of the plot Title.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_trend_change(m, ax=None, plot_name='Trend Change', figsize=(10, 6))

Make a barplot of the magnitudes of trend-changes.

Parameters
  • m (NeuralProphet) – fitted model.

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • plot_name (str) – Name of the plot Title.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_weekly(m, comp_name='weekly', weekly_start=0, quick=True, ax=None, figsize=(10, 6))

Plot the yearly component of the forecast.

Parameters
  • m (NeuralProphet) – fitted model.

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • weekly_start (int) – specifying the start day of the weekly seasonality plot. 0 (default) starts the week on Sunday. 1 shifts by 1 day to Monday, and so on.

  • quick (bool) – use quick low-evel call of model. might break in future.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

  • comp_name (str) – Name of seasonality component if previously changed from default ‘weekly’.

Returns

a list of matplotlib artists

neuralprophet.plot_model_parameters.plot_yearly(m, comp_name='yearly', yearly_start=0, quick=True, ax=None, figsize=(10, 6))

Plot the yearly component of the forecast.

Parameters
  • m (NeuralProphet) – fitted model.

  • ax (matplotlib axis) – matplotlib Axes to plot on. One will be created if this is not provided.

  • yearly_start (int) – specifying the start day of the yearly seasonality plot. 0 (default) starts the year on Jan 1. 1 shifts by 1 day to Jan 2, and so on.

  • quick (bool) – use quick low-evel call of model. might break in future.

  • figsize (tuple) – width, height in inches. Ignored if ax is not None. default: (10, 6)

  • comp_name (str) – Name of seasonality component if previously changed from default ‘yearly’.

Returns

a list of matplotlib artists