Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(prophet)
- library(readxl)
- bch <- read_excel("C:/Users/user/Desktop/bchdata/bch.xls",
- col_types = c("numeric", "date"))
- **you can replace the directory for the location of your data**
- df2 <- bch
- m <- prophet(df2)
- future <- make_future_dataframe(m, periods = 365)
- tail(future)
- forecast <- predict(m, future)
- tail(forecast[c('ds', 'yhat', 'yhat_lower', 'yhat_upper')])
- plot(m, forecast)
- prophet_plot_components(m, forecast)
- dyplot.prophet(m, forecast, main="Bitcoin Cash Forecast")
Advertisement
Add Comment
Please, Sign In to add comment