Open In Colab

Multiplicative SeasonalityΒΆ

By default NeuralProphet fits additive seasonalities, meaning the effect of the seasonality is added to the trend to get the forecast. This time series of the number of air passengers is an example of when additive seasonality does not work:

if 'google.colab' in str(get_ipython()):
    !pip install git+ # may take a while
    #!pip install neuralprophet # much faster, but may not have the latest upgrades/bugfixes

import pandas as pd
from neuralprophet import NeuralProphet, set_log_level
data_location = ""
df = pd.read_csv(data_location + "air_passengers.csv")
m = NeuralProphet()
metrics =, freq="MS")

forecast = m.predict(df)
fig = m.plot(forecast)
# fig_param = m.plot_parameters()

This time series has a clear yearly cycle, but the seasonality in the forecast is too large at the start of the time series and too small at the end. In this time series, the seasonality is not a constant additive factor as assumed by NeuralProphet, rather it grows with the trend. This is multiplicative seasonality.

NeuralProphet can model multiplicative seasonality by setting seasonality_mode="multiplicative" in the input arguments:

m = NeuralProphet(seasonality_mode="multiplicative")
metrics =, freq="MS")

forecast = m.predict(df)
fig = m.plot(forecast)
# fig_param = m.plot_parameters()

The components figure will now show the seasonality as a percent of the trend:

fig_param = m.plot_components(forecast)

Note that the seasonality is only fit on data occuring at the start of the month. Thus, the plotted values for seasonality inbetween months may take on random values.

Settingseasonality_mode="multiplicative" will model all seasonalities as multiplicative, including custom seasonalities added with add_seasonality.