Skip to content

Instantly share code, notes, and snippets.

@foundinblank
Last active January 10, 2019 09:46
Show Gist options
  • Save foundinblank/ab64b86bc61b9c0d2bca644f2e5aa709 to your computer and use it in GitHub Desktop.
Save foundinblank/ab64b86bc61b9c0d2bca644f2e5aa709 to your computer and use it in GitHub Desktop.
Prophet introduction
library(prophet)
df # A data frame with columns ds & y (datetimes & metrics)
# Create a prophet object
m <- prophet(df)
# Extend dataframe 100 days into the future
future <- make_future_dataframe(m, periods = 100)
# Generate forecast for next 100 days
forecast <- predict(m, future)
# Reference: https://medium.com/@foundinblank/goal-based-forecasting-in-prophet-r-b79900c64ca6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment