Commit graph

238 commits

Author SHA1 Message Date
Cuong Duong
9869a3b2dc bump r version for release 2022-09-09 01:02:32 +10:00
bartekch
c9cf658674
Make holidays data internal and exported at the same time (#2185) 2022-09-05 06:15:12 +10:00
Cuong Duong
d1f8a62098
Bump R version for release (#2204) 2022-06-25 07:10:48 +10:00
Cuong Duong
cc8c69a3ba
Update codegen for packaging rstan models (#2180) 2022-05-25 00:11:08 +10:00
Cuong Duong
679db85047
Update holidays data (#2179) 2022-05-25 00:10:46 +10:00
RaymondMcT
e665430adc
Improved execution time of rolling_mean_by_h (#2142) 2022-05-24 22:28:58 +10:00
Andrew Johnson
2bbcd2c698
Use normal glm distribution for Stan model (#2051) 2022-05-24 22:11:22 +10:00
Andrew
ed0dc7a3fd
Regenerate generated_holidays.rda (#2094) 2022-01-08 09:03:58 +11:00
Cuong Duong
be87004df9 Merge remote-tracking branch 'upstream/master' into minor-fixing 2021-08-28 02:04:44 +10:00
slowy07
05aa1fdd37 fix: typo grammar 2021-08-03 08:37:45 +07:00
markseeto
e69f2f503f
Add drop = FALSE in regressor_coefficients()
Add `drop = FALSE` in definition of `regressor_coefficients()` to handle the case when there is only one additional regressor.
2021-05-21 17:45:18 +10:00
Cuong Duong
14fa36b4d5
Update ignores for development (#1906)
* update ignores for development

* force rstantools 2.0.0

* remove mc-stan repo, do not install Suggests

* install suggested packages manually
2021-05-11 08:37:19 -07:00
Cuong Duong
f99fff94b3
Fix R CI (#1907)
* force rstantools 2.0.0

* remove mc-stan repo, do not install Suggests

* install suggested packages manually
2021-05-11 08:24:22 -07:00
Cuong Duong
a794018d65
Add support for cmdstanr backend (#1806)
* init

* add suggested packages

* use environment variables and align more with Py package

* remove additional testing logic, default to lbfgs

* Remove Newton specifier from test because cmdstanr expects newton

Co-authored-by: Ben Letham <bletham@gmail.com>
2021-05-10 16:09:25 -07:00
Cuong Duong
9cad5a05fb
regenerate holidays csv (#1902) 2021-05-10 16:05:59 -07:00
Sean Taylor
1eed11b0f1 Remove organization field from license 2021-03-29 15:36:57 -07:00
Ben Letham
3f4edef7f5 Fix R handling of dates to work for tsibble 2021-03-29 15:06:09 -07:00
Ben Letham
4869ccf943 Skip stan function tests on windows 2021-03-24 08:46:44 -07:00
Ben Letham
b5e67e59c3 Clean up R check warnings 2021-03-04 20:59:51 -08:00
Ben Letham
b7a583ec63 R manual update 2021-03-04 17:17:51 -08:00
Ben Letham
612934695b Version bump 2021-03-04 17:16:23 -08:00
Ben Letham
a4b31cd70b Refactor R cross validation to match Py function structure 2021-03-04 14:04:48 -08:00
Ben Letham
4e99ac686e Validate custom cutoffs for data range (R #1650) 2021-03-03 17:59:24 -08:00
Ben Letham
58a0b96550 Plot continuous weekly seasonality in R (#1557, translates #1615 and #1707) 2021-03-03 17:43:58 -08:00
Ben Letham
aaa89445a1 R use GMT for all dates to avoid daylight savings (#1501) 2021-03-03 16:53:39 -08:00
Ben Letham
f123a1a7cc Fix holidays NA handling 2021-03-03 16:06:25 -08:00
Ben Letham
2e9f831474 Check for NAs in holiday dataframe 2021-03-03 15:43:49 -08:00
Ben Letham
8f1c1d5a27 Fix bug in timezone handling in R (#1501) 2021-03-03 14:35:36 -08:00
Cuong Duong
fae1ac1f9a
add mdape and smape to performance metrics tests (#1804) 2021-03-02 08:30:23 -08:00
Cuong Duong
2d56e71fed
Add regressor_coefficients function for R (#1803)
* function code

* add tests for regressor coefficients utility

* add documentation for regressor_coefficients util function

* generate Rd docs

* add regressor_coefficients to R namespace

* minor formatting nit

* fix bugs
2021-03-02 08:30:00 -08:00
Sam Snarr
e95d7c5155
Clean docs (#1798)
* added links and formatting

* update docs via `make notebooks`

* Updated rstan build files (by running R CMD INSTALL .)
2021-03-02 08:06:14 -08:00
Sam Snarr
3adcf9312d
imports RcppParallel and excludes one function that is already in the namespace by importing Rcpp (#1779) 2021-01-14 14:38:36 -08:00
Sam Snarr
2d8e6c7fd1
Added growth='flat' functionality in R (#1778)
* added `flat_growth_init()` function

* added validation for 'flat'

* changed `fit.prophet()` to handle `growth='flat'`

* added `trend='flat'` capabilities to `sample_predictive_trend()` and `fit.prophet()`

* updated STAN code to handle flat trend

* [Syntax fix] Removed unnecessary bracket

* updated documentation

* undid formatting that was accidentally applied by autoformatter

* undid more formatting that was accidentally applied by autoformatter

* added tests

* typo in `sample_predictive_trend()`

* updated notebook with example in R

* updated documentation
2021-01-14 13:53:08 -08:00
sim
73b53658e1
used regex to format the name variable for plotting holiday components (#1766)
* used regex to format the `name`

Removes all singlequotes (') and doublequotes (") in the `name` variable
and replaces all whitespace with an underscore. Now, `ggplot2::aes_string()` can handle a column
name like `New Year's Day`.

* Used backticks in the `name` variable instead of regular expressions

Essentially, I escaped the string `name` with backticks so that
`ggplot2::geom_line()` and `ggplot2::ggplot()` functions can use any
arbitrary input.
2021-01-08 13:22:56 -08:00
Pawel Kranzberg
ad3832bb19
Add SMAPE to diagnostics.R (#1711)
* Add SMAPE to diagnostics.R

Add symmetric mean absolute percentage error.
Include mdape and smape as default performance metrics.

* Add SMAPE to diagnostics.R

Add symmetric mean absolute percentage error.
Include mdape and smape as default performance metrics.

* sMAPE minor code formatting improvements

* Fixed smape function in diagnostics.R
2020-11-09 10:42:20 -08:00
Ben Letham
77da5b8c06 Update test to match Py 2020-09-03 17:21:30 -07:00
Sean J. Taylor
201230e1a5
Alphabetize import block 2020-09-02 18:40:30 -07:00
Matt Dancho
d7cd1f299d facebook/prophet#1628 - Import StanHeaders to fix dyn.load error 2020-09-01 09:46:42 -04:00
Ben Letham
2061f251f8 Clean up script for R holidays, and regenerate 2020-08-27 18:36:18 -07:00
Bas Jacobs
e992e0b7b6
Split non-existing holiday for NL in R (#1637)
* Split NL 'Bevrijdingsdag, Hemelvaart' holiday

* Split NL 'Bevrijdingsdag, Hemelvaart' holiday in generated_holidays.rda

Co-authored-by: Bas Jacobs <bas.jacobs@bax-shop.nl>
2020-08-24 12:22:37 -07:00
Ben Letham
dd9a6a4161 resolve R check note 2020-08-18 19:14:16 -07:00
Ben Letham
a88f6458ad Fix test issues 2020-08-17 18:36:29 -07:00
Ben Letham
ccde3a498f version bump 2020-08-17 17:43:55 -07:00
Ben Letham
a519043f1b Fix bug in changepoint handling in prophet_copy (#1529) 2020-08-17 16:24:34 -07:00
Ben Letham
fb6552137c Deduplicate history dates for make_future_dataframe 2020-08-17 14:51:06 -07:00
Ryan Nazareth
f16d9df333
Add mdape performance metric to R (#1472)
* add test and initial function for mdape in R

* Add separate rolling_median_func and tests

* Modify rolling median function

* fix syntax in rolling median function

* sort by h

* R/diagnostics.R

* update .rd docs and notebook

* Add mdape to performance metrics params docstring
2020-05-20 12:28:50 -07:00
Ryan Nazareth
16e632a695
Add custom cutoff option to R (#1484)
* Add test for custom cutoff cv

* implement custom cutoff logic in cv function

* add docstring

* add description in notebook and rebuild .Rd docs

* fix bug and add test case for period is NULL

* replace s.POSIXct set_date
2020-05-15 14:32:54 -07:00
Hadley Wickham
cded5c41b0 Fix failure with dplyr 1.0.0
I'm not sure why a data frame ends up with names and a tibble does not, but it doesn't seem like an important enough problem to investigate in detail, and this is a simple fix.
2020-04-28 17:51:36 -05:00
Mikhail Popov
25e2b88765 {rstantools}-based compilation
+ cleans up Stan model compilation by switching over to the rstantools-based workflow (see https://mc-stan.org/rstantools/articles/minimal-rstan-package.html for more info)
+ minor documentation change: {devtools} -> {remotes}, which is better for end-users
+ adds RStudio project file which makes it easier for community to get started with contributing to the package
2020-04-28 16:06:17 -04:00
Mitchell O'Hara-Wild
578b78a8f3
Use system.file() to obtain package installation path (#1435) 2020-04-23 13:06:36 -07:00