2017-02-22 23:59:43 +00:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
2017-12-22 21:36:46 +00:00
|
|
|
% Please edit documentation in R/plot.R
|
2017-02-22 23:59:43 +00:00
|
|
|
\name{plot.prophet}
|
|
|
|
|
\alias{plot.prophet}
|
|
|
|
|
\title{Plot the prophet forecast.}
|
|
|
|
|
\usage{
|
2017-04-11 05:48:43 +00:00
|
|
|
\method{plot}{prophet}(x, fcst, uncertainty = TRUE, plot_cap = TRUE,
|
|
|
|
|
xlabel = "ds", ylabel = "y", ...)
|
2017-02-22 23:59:43 +00:00
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{x}{Prophet object.}
|
|
|
|
|
|
|
|
|
|
\item{fcst}{Data frame returned by predict(m, df).}
|
|
|
|
|
|
|
|
|
|
\item{uncertainty}{Boolean indicating if the uncertainty interval for yhat
|
|
|
|
|
should be plotted. Must be present in fcst as yhat_lower and yhat_upper.}
|
|
|
|
|
|
2017-04-11 05:48:43 +00:00
|
|
|
\item{plot_cap}{Boolean indicating if the capacity should be shown in the
|
|
|
|
|
figure, if available.}
|
|
|
|
|
|
2017-02-26 15:31:34 +00:00
|
|
|
\item{xlabel}{Optional label for x-axis}
|
|
|
|
|
|
|
|
|
|
\item{ylabel}{Optional label for y-axis}
|
|
|
|
|
|
2017-02-22 23:59:43 +00:00
|
|
|
\item{...}{additional arguments}
|
|
|
|
|
}
|
|
|
|
|
\value{
|
|
|
|
|
A ggplot2 plot.
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
Plot the prophet forecast.
|
|
|
|
|
}
|
|
|
|
|
\examples{
|
|
|
|
|
\dontrun{
|
|
|
|
|
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)
|
|
|
|
|
plot(m, forecast)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|