diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 132ec5f..2e300f5 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -77,7 +77,7 @@ jobs: - name: Install dependencies run: | remotes::install_deps(pkgdir = "R/", dependencies = NA) - remotes::install_cran("rcmdcheck") + remotes::install_cran(c("rcmdcheck", "knitr", "testthat", "readr", "rmarkdown")) install.packages(c("cmdstanr", "posterior"), repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) shell: Rscript {0} - name: Check diff --git a/R/R/utilities.R b/R/R/utilities.R index 85cd322..57cf3fe 100644 --- a/R/R/utilities.R +++ b/R/R/utilities.R @@ -38,7 +38,7 @@ regressor_coefficients <- function(m){ regr_mus <- unlist(lapply(m$extra_regressors, function (x) x$mu)) regr_stds <- unlist(lapply(m$extra_regressors, function(x) x$std)) - beta_indices <- which(m$train.component.cols[, regr_names] == 1, arr.ind = TRUE)[, "row"] + beta_indices <- which(m$train.component.cols[, regr_names, drop = FALSE] == 1, arr.ind = TRUE)[, "row"] betas <- m$params$beta[, beta_indices, drop = FALSE] # If regressor is additive, multiply by the scale factor to put coefficients on the original training data scale. y_scale_indicator <- matrix( diff --git a/README.md b/README.md index 1bb1061..6adb886 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ![Build](https://github.com/facebook/prophet/workflows/Build/badge.svg) [![Pypi_Version](https://img.shields.io/pypi/v/prophet.svg)](https://pypi.python.org/pypi/prophet) [![Conda_Version](https://anaconda.org/conda-forge/prophet/badges/version.svg)](https://anaconda.org/conda-forge/prophet/) +[![CRAN status](https://www.r-pkg.org/badges/version/prophet)](https://CRAN.R-project.org/package=prophet) Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 5c8e531..46d183a 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -205,14 +205,14 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.5.0) + mini_portile2 (2.5.1) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.14.3) multipart-post (2.1.1) - nokogiri (1.11.1) + nokogiri (1.11.4) mini_portile2 (~> 2.5.0) racc (~> 1.4) octokit (4.20.0) diff --git a/python/prophet/forecaster.py b/python/prophet/forecaster.py index 7d02b85..e9b826f 100644 --- a/python/prophet/forecaster.py +++ b/python/prophet/forecaster.py @@ -27,8 +27,8 @@ class Prophet(object): Parameters ---------- - growth: String 'linear' or 'logistic' to specify a linear or logistic - trend. + growth: String 'linear', 'logistic' or 'flat' to specify a linear, logistic or + flat trend. changepoints: List of dates at which to include potential changepoints. If not specified, potential changepoints are selected automatically. n_changepoints: Number of potential changepoints to include. Not used