Cross-validation for time series.
Merge history and forecast for plotting.
Fit the prophet model.
Provides Fourier series components with the specified frequency and order.
Adds a component with given name that contains all of the components
in group.
Add an additional regressor to be used for fitting and predicting.
Construct a matrix of holiday features.
make_seasonality_features
Data frame with seasonality features.
Predict using the prophet model.
predict_seasonal_components
Predict seasonality components, holidays, and added regressors.
Add a seasonal component with specified period, number of Fourier
components, and prior scale.
Compile Stan model
Load compiled Stan model
Initialize model scales.
Get number of Fourier components for built-in seasonalities.
Evaluate the piecewise linear function.
Evaluate the piecewise logistic function.
Plot the prophet forecast.
Copy Prophet object.
Plot the weekly component of the forecast.
Plot the yearly component of the forecast.
Sample from the posterior predictive distribution.
Prophet forecaster.
Plot the components of a prophet forecast.
Prints a ggplot2 with panels for trend, weekly and yearly seasonalities if
present, and holidays if present.
Convert date vector
Prepare dataframe for fitting or predicting.
make_all_seasonality_features
Dataframe with seasonality features.
Includes seasonality features, holiday features, and added regressors.
Make dataframe with future dates for forecasting.
Plot a particular component of the forecast.
Plot a custom seasonal component.
Generate cutoff dates
Gets changepoint matrix for history dataframe.
Initialize linear growth.
Initialize logistic growth.
Predict trend using the prophet model.
Set seasonalities that were left on auto.
Set changepoints
Simulate the trend using the extrapolated generative model.
Prepare dataframe for plotting seasonal components.
Validates the name of a seasonality, holiday, or regressor.
Validates the inputs to Prophet.
simulated_historical_forecasts
Simulated historical forecasts.
Time difference between datetimes
Prophet uncertainty intervals for yhat and trend
Simulate observations from the extrapolated generative model.
sample_posterior_predictive
Prophet posterior predictive samples.