ga_prophet_forecast: Forecast time series data using Facebook's Prophet API

Description Usage Arguments

View source: R/ga_time_series_forecasting.R

Description

Forecast time series data using Facebook's Prophet API

Usage

1
2
3
4
5
6
7
ga_prophet_forecast(df, time_col, value_col = NULL, periods = 10,
  time_unit = "day", include_history = TRUE, test_mode = FALSE,
  fun.aggregate = sum, na_fill_type = NULL, na_fill_value = 0,
  cap = NULL, floor = NULL, growth = NULL,
  weekly.seasonality = TRUE, yearly.seasonality = TRUE,
  holiday_col = NULL, holidays = NULL, regressors = NULL,
  funs.aggregate.regressors = NULL, ...)

Arguments

df

- Data frame

time_col

- Column that has time data

value_col

- Column that has value data

periods

- Number of time periods (e.g. days. unit is determined by time_unit) to forecast.

time_unit

- "second"/"sec", "minute"/"min", "hour", "day", "week", "month", "quarter", or "year".

include_history

- Whether to include history data in forecast or not.

fun.aggregate

- Function to aggregate values.

na_fill_type

- Type of NA fill: NULL - Skip NA fill. Default behavior. "previous" - Fill with previous non-NA value. "value" - Fill with the value of na_fill_value. "interpolate" - Linear interpolation. "spline" - Spline interpolation.

na_fill_value

- Value to fill NA when na_fill_type is "value"

cap

- Achievable Maximum Capacity of the value to forecast. https://facebookincubator.github.io/prophet/docs/forecasting_growth.html It can be numeric or data frame. When numeric, the value is used as cap for both modeling and forecasting. When it is a data frame, it should be a future data frame with cap column for forecasting. When this is specified, the original data frame (df) should also have cap column for modeling. When either a numeric or a data frame is specified, growth argument for prophet becomes "logistic", as opposed to default "linear".

growth

- This parameter used to specify type of Trend, which can be "linear" or "logistic", but now we determine this automatically by cap. It is here just to avoid throwing error from prophet, (about doubly specifying grouth param by our code and by "...") when old caller calls with this parameter.

weekly.seasonality

- Whether to return weekly seasonality data.

yearly.seasonality

- Whether to return yearly seasonality data.

holidays

- Holiday definition data frame.

...

- extra values to be passed to prophet::prophet. listed below.

seasonality.prior.scale

- Strength of seasonality. Default is 10.

n.changepoints

- Number of potential changepoints. Default is 25.

changepoint.prior.scale

- Flexibility of automatic changepoint selection. Default is 0.05.

changepoints

- list of potential changepoints.

holidays.prior.scale

- Strength of holiday effect. Default is 10.

mcmc.samples

- MCMC samples for full bayesian inference. Default is 0.

interval.width

- Width of uncertainty intervals.

uncertainty.samples

- Number of simulations made for calculating uncertainty intervals. Default is 1000.


IronistM/googleAnalyticsModelR documentation built on May 17, 2019, 1:13 a.m.