The meaning of the four main components of plot_components in the Prophet model

The meaning of the four main components of plot_components in the Prophet model

In the Prophet model, the plot_components function can perform visual analysis on different components of time series data, thereby providing users with a certain reference basis. There are four main components, the meanings are as follows:

  • trend : That is, the trend, indicating the overall trend change of the time series data . Trends in Prophet models are often detected and predicted using piecewise linear regression.
  • weekly : that is, weekly periodicity, which indicates the repeated change pattern of time series data within a week . This pattern may have a certain degree of universality, and it is not specific to the pattern of which week. For example, weekend sales may be higher than weekday sales, or a specific day of the week may have higher traffic, etc.
  • holidays : Indicates the holiday effect, that is, some specific holidays or events may have an impact on time series data , such as Christmas, Spring Festival and other holidays. In the Prophet model, the holiday effect is regarded as a binary indicator (indicator), which is used to model the impact of holidays on time series.
  • yearly : That is, annual periodicity, which represents the repeated change pattern of time series data within a year . For example, some industries will have sales peaks in different seasons. For example, the sales of the food industry have increased during the Spring Festival holiday.

The plot_components in the Prophet model can help us better understand the change pattern of time series data on different components, and during the model fitting process, we can make full use of these pattern information by adjusting the model parameters to obtain more accurate prediction results.


In addition to the four main components (trend, weekly periodicity, holiday effect and annual periodicity) provided in the plot_components function in the Prophet module, you can also add custom seasonality, rhythm and other components through the add_seasonality method , and visualize them in plot_components. The add_seasonality method can specify parameters such as the period and intensity of the seasonal component, and optimize it during the model fitting process.

In addition, additional exogenous variables (that is, other factors that have an impact on time series data) can be added through the add_regressor method, such as promotional activities before holidays, weather factors, etc., so as to improve the predictive ability of the model under the effect of exogenous variables . The add_regressor method can also be visualized in plot_components.

In addition to the regular components and variables, there are some other components and variables, such as the change point of the trend, noise, etc. These components and variables can be visualized and evaluated using the changepoints and uncertainty_samples parameters, where the changepoints parameter can help detect change points in trends, and the uncertainty_samples parameter can help assess noise levels.

Guess you like

Origin blog.csdn.net/qq_42774234/article/details/130165727