Documentation fixes

This commit is contained in:
Ben Letham 2018-12-03 13:25:26 -08:00
parent 536fe931c6
commit e3ad97b8b3
6 changed files with 13 additions and 6 deletions

View file

@ -9,9 +9,7 @@ export(add_seasonality)
export(cross_validation) export(cross_validation)
export(dyplot.prophet) export(dyplot.prophet)
export(fit.prophet) export(fit.prophet)
export(get_holiday_names)
export(make_future_dataframe) export(make_future_dataframe)
export(make_holidays_df)
export(performance_metrics) export(performance_metrics)
export(plot_cross_validation_metric) export(plot_cross_validation_metric)
export(plot_forecast_component) export(plot_forecast_component)

View file

@ -11,7 +11,7 @@
#' @param country.name Country name (character). #' @param country.name Country name (character).
#' #'
#' @return A vector of all possible holiday names (unique) of given country. #' @return A vector of all possible holiday names (unique) of given country.
#' @export #' @internal
get_holiday_names <- function(country.name){ get_holiday_names <- function(country.name){
holidays <- generated_holidays %>% holidays <- generated_holidays %>%
dplyr::filter(country == country.name) %>% dplyr::filter(country == country.name) %>%
@ -23,11 +23,12 @@ get_holiday_names <- function(country.name){
#' Make dataframe of holidays for given years and countries #' Make dataframe of holidays for given years and countries
#' #'
#' @param years List of years for which to include holiday dates.
#' @param country.name Country name (character). #' @param country.name Country name (character).
#' #'
#' @return Dataframe with 'ds' and 'holiday', which can directly feed #' @return Dataframe with 'ds' and 'holiday', which can directly feed
#' to 'holidays' params in Prophet #' to 'holidays' params in Prophet
#' @export #' @internal
make_holidays_df <- function(years, country.name){ make_holidays_df <- function(years, country.name){
country.holidays = generated_holidays %>% country.holidays = generated_holidays %>%
dplyr::filter(country == country.name) dplyr::filter(country == country.name)

View file

@ -8,10 +8,12 @@
## Makes R CMD CHECK happy due to dplyr syntax below ## Makes R CMD CHECK happy due to dplyr syntax below
globalVariables(c( globalVariables(c(
"ds", "y", "cap", ".", "ds", "y", "cap", ".",
"component", "dow", "doy", "holiday", "holidays", "holidays_lower", "component", "dow", "doy", "holiday", "holidays", "holidays_lower", "generated_holidays",
"holidays_upper", "ix", "lower", "n", "stat", "trend", "row_number", "extra_regressors", "col", "holidays_upper", "ix", "lower", "n", "stat", "trend", "row_number", "extra_regressors", "col",
"trend_lower", "trend_upper", "upper", "value", "weekly", "weekly_lower", "weekly_upper", "trend_lower", "trend_upper", "upper", "value", "weekly", "weekly_lower", "weekly_upper",
"x", "yearly", "yearly_lower", "yearly_upper", "yhat", "yhat_lower", "yhat_upper")) "x", "yearly", "yearly_lower", "yearly_upper", "yhat", "yhat_lower", "yhat_upper",
"country", "year"
))
#' Prophet forecaster. #' Prophet forecaster.
#' #'

View file

@ -7,6 +7,8 @@
make_holidays_df(years, country.name) make_holidays_df(years, country.name)
} }
\arguments{ \arguments{
\item{years}{List of years for which to include holiday dates.}
\item{country.name}{Country name (character).} \item{country.name}{Country name (character).}
} }
\value{ \value{

View file

@ -9,6 +9,9 @@ validate_inputs(m)
\arguments{ \arguments{
\item{m}{Prophet object.} \item{m}{Prophet object.}
} }
\value{
The Prophet object.
}
\description{ \description{
Validates the inputs to Prophet. Validates the inputs to Prophet.
} }

View file

@ -435,6 +435,7 @@ def plot_cross_validation_metric(
In [0, 1]. Defaults to 0.1. In [0, 1]. Defaults to 0.1.
ax: Optional matplotlib axis on which to plot. If not given, a new figure ax: Optional matplotlib axis on which to plot. If not given, a new figure
will be created. will be created.
figsize: Optional tuple width, height in inches.
Returns Returns
------- -------