dyplot.prophet: Plot the prophet forecast.

View source: R/plot.R

dyplot.prophetR Documentation

Plot the prophet forecast.

Description

Plot the prophet forecast.

Usage

dyplot.prophet(x, fcst, uncertainty = TRUE, ...)

Arguments

x

Prophet object.

fcst

Data frame returned by predict(m, df).

uncertainty

Optional boolean indicating if the uncertainty interval for yhat should be plotted, which will only be done if x$uncertainty.samples > 0. Must be present in fcst as yhat_lower and yhat_upper.

...

additional arguments passed to dygraph::dygraph

Value

A dygraph plot.

Examples

## Not run: 
history <- data.frame(
 ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'),
 y = sin(1:366/200) + rnorm(366)/10)
m <- prophet(history)
future <- make_future_dataframe(m, periods = 365)
forecast <- predict(m, future)
dyplot.prophet(m, forecast)

## End(Not run)


chris-prener/falseProphet documentation built on April 15, 2022, 12:04 a.m.