Commit graph

557 commits

Author SHA1 Message Date
Ben Letham
9fb8f103d6 Minor simplification to weekly plotting logic 2020-08-17 17:40:01 -07:00
Ben Letham
2049217471 Use y_scale in coefficient utility 2020-08-17 17:25: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
Ben Letham
6ec0a90a60 Use holidays package for Turkey 2020-08-17 14:24:47 -07:00
Lawrence A. Krukrubo
c7c63ff568
Style: Adding a method docstring (#1627)
Adding a docstring to the `stan_init()` method of
`additional_topics.ipynb` notebook
2020-08-17 14:04:06 -07:00
Ben Letham
75ec9dffb1 Fix holidays for pandas 1.1.0 2020-08-14 11:03:04 -07:00
Dani
5accde4fb5
resolve python requirements : pandas<1.1.0 (#1623) 2020-08-12 14:37:15 -07:00
anqus
ad53b428c3
Plot continuous weekly seasonality with sub daily data (#1615)
* Check frequency of data

* If sub-daily, use plot_seasonality()

* Format xticks as weekdays for plot_seasonality()

* Display 8 xticks for weekly component
2020-08-12 14:30:06 -07:00
Cuong Duong
40b170b95a
Add helper function to summarise coefficients of extra regressors (#1572)
* add regressor summary fn for python

* styling, docstring

* update docstring

* fix definition for multiplicative regressor, add tests

* simpler shape test
2020-08-12 12:12:24 -07:00
Dani
1053a6e9ce
Update PyPi package metadata and resolve Travis CI failing build (#1602)
* Update PyPi package metadata setup.py 'long_description'

* Add V8 package to Travis CI config & caching pip
2020-07-29 17:02:37 -07:00
Canute
198ef89082
changed unnittest to unittest (#1556) 2020-07-29 15:51:30 -07:00
Ben Letham
0d260699e4
Faster builds for R CI (#1538)
* Change R CI for MacOS

* specify binary installs

* try cache packages

* trigger rebuild to see if caching worked
2020-06-12 16:58:18 -07:00
Ben Letham
20d6afba8b Update site with legal footer 2020-06-12 13:30:41 -07:00
Ryan Nazareth
6399266780
Instructions for contributing code to Prophet (#1513)
* add first part on build environment and branching

* add rest of workflow tests-pull-requests-docs etc

* Typos and updates

* Highlight Python and R headings

* Reorder sections and condense material

* Few more enhancements
2020-06-10 17:44:02 -07:00
Robin Teuwens
87844821d3
Making sure 'holiday' is a Dataframe when using plot_components_ploty() (#1526)
* Issue #1525: Using m.construct_holiday_dataframe() to make sure 'holidays' is a DataFrame.

* #1525 | issuecomment-639399524 | enhancement: have plotly graph the holiday component consistent with matplotlib.

Co-authored-by: Robin Teuwens <teuwens@electris.lu>
2020-06-10 17:33:12 -07:00
Ryan Nazareth
9a27386ccc
Add checks for R to Travis CI (#1505)
* Add R check to travis

* add install step for R

* only run testsrather than R CMD check

* Fix command

* add line for installing dependencies

* fix syntax error
2020-06-10 14:35:00 -07:00
Ryan Nazareth
30bcfed918
Include mdape in performance metric docstring (#1512)
* update docstring with mdape in list for python perf metric func

* re-run python notebook cell to generate  mdape in results table

* remove comment

Co-authored-by: Ben Letham <bletham@gmail.com>
2020-06-05 17:51:25 -07:00
Ryan Nazareth
31841c90c9
import tqdm.auto instead (#1509) 2020-06-05 17:46:41 -07:00
Puneet Saini
50a8c46477
Update trend_changepoints.md (#1504)
Minor grammatical fix
2020-06-05 16:59:31 -07:00
Chanran Kim
5669f13abf
Drop Korea class from hdays.py (#1438)
To solve this [issue](https://github.com/facebook/prophet/issues/1437) by @chongdae

Korean lunar calendar which is different from Chinese lunar calendar is added python-holidays package recently.
This commit is about dropping the Korean and KR class in hdays.py file and hdays_part1(holidays) will work for Korean holidays.

```
import fbprophet.hdays as hdays_part2
import holidays as hdays_part1
``
2020-06-05 16:54:58 -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
Ryan Nazareth
3578e93062
Add partial fit example and caveats to notebook (#1486)
* Add partial fit example and caveats to notebook

* correct typos

* Shift example to separate ipynb

* fix typos

* rename notebook
2020-05-14 21:59:37 -07:00
Ben Letham
0dd8e522f1 Remove plot from flat trend example 2020-05-14 21:45:03 -07:00
Ryan Nazareth
ac59b44ca3
add implementation for constant trend in Python (#1466)
* add implementation for constant trend

* force k and delta params to be 0s

* add tests and fix n_changepoints, changepoints_t to 0

* Add test for cv with constant trend

* Add docs and test for checking invalid input

* make changes to stan

* add transformed params block in stan and output flat trend vector

* correct syntax

* transformed params syntax

* Fix test and port changes to win stan file

* add test for flat trend function

* Add separate function for flat trend init

* fix test
2020-05-14 21:40:40 -07:00
Ryan Nazareth
cb4f1dcc59
Remove Python 2 from setup.py (#1485)
* remove python 2 from setup.py and add python_requires

* add note in README
2020-05-14 12:16:34 -07:00
Ryan Nazareth
caaaee8d34
Add example of auto parameter selection to notebook diagnostics (#1464)
* Add example of dask distributed parameter tuning to notebook diagnostics

* Rearrange description blocks and correct typos

* Add more informative explanations and tips in docs for tuning examples

* increase output df column width to see results

* add instructions for multiprocess and threaded

* reset index of hyperparameter tuning results df

* fix typos

* remove blank code cell

* grammar correction

* Add subsection

* Split different parameter optimsiation examples
2020-05-07 10:04:22 -07:00
above-c-level
9168dcf11d
Removed redundant line in Prophet docstring (#1474) 2020-05-06 13:00:03 -07:00
Ben Letham
a3bf6c4cdc Switch R install instructions back to CRAN 2020-05-05 14:13:58 -07:00
Sean J. Taylor
3ccbd0e0e9
Merge pull request #1461 from hadley/dplyr-1.0.0
dplyr 1.0.0 compatibility
2020-04-28 18:02:10 -07:00
Sean J. Taylor
3d19c1335e
Merge pull request #1458 from bearloga/master
{rstantools}-based compilation
2020-04-28 16:12:46 -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
Chris Benson
98f2a7be18
Fix Issue with Pickling Models in Python3.6 because of Logger Attribute (#1452)
* Fix issue with pickeling models due to logger

* Fixes Model Pickle Error in Python3.6 as described in #1361
2020-04-28 12:30:31 -07:00
Tom Augspurger
5fe3be86c5
Parallel Cross Validation (#1434)
* API: Refactor to parallel / cf

* Added Dask-based parallelism

* fix test

* cover bad parallel

* avoid multiprocess issue under setuptools tests

* Update notebook docs

* fix docstring

* install note

* arbitrary object

* fixups

* fixups

* fixups

* remove unused import
2020-04-28 12:25:41 -07:00
Ben Letham
59e374b1ad Change R install instructions from CRAN to github 2020-04-27 18:11:16 -07:00
Chanran Kim
309035cb97
Update seasonality,_holiday_effects,_and_regressors.ipynb (#1440)
To solve the #1391 Problem
2020-04-23 13:18:27 -07:00
Mitchell O'Hara-Wild
578b78a8f3
Use system.file() to obtain package installation path (#1435) 2020-04-23 13:06:36 -07:00
Ben Letham
6cd14438c6 Update version in serialize test 2020-04-04 08:43:28 -07:00
Ben Letham
231200ffaa mark dev version 2020-04-04 08:28:42 -07:00
Ben Letham
c943d966b4
Add functions for serializing to/from JSON (#1414)
* Add functions for serializing to/from JSON

* Fix list vs. series type issue, track version

* Avoid DateTimeIndex

* bugfix

* another fix

* Fix copy test

* Fix issue with pre-epoch dates

* Handle empty datetime series
2020-04-04 08:23:27 -07:00
Marco Fusi
3c69ce3312
modified cross_validation to allow custom cutoffs (#1402)
* modified cross_validation to allow custom cutoffs

* moved set period, initials and identify larg. seas

* modified the diagnostics and added the test

* reverted cv default value tests and added a new custom cutoff test

* reorganized to raise the seasonality period warning message even if cutoffs are manually specified

* moved the initials vs. seasonality check

* changed assertCountEqual to assertItemsEqual in cv

* modified to test lengths instread of cutoff values

Co-authored-by: Fusi Marco <Marco.Fusi@valuelab.it>
2020-03-26 16:36:02 -07:00
Mitzi Morris
d22922d08c
sampling iters arg name, logic changes (#1389)
* sampling iters arg name, logic changes

* Bump cmdstanpy version in requirements to 0.9.5

* Change Model to CmdStanModel

Co-authored-by: Ben Letham <bletham@gmail.com>
2020-03-24 14:33:52 -07:00
sheikheddy
e9771c862d
Holidays in United Arab Emirates (#1390)
Added official holidays of the UAE. Our dates for Eid are slightly longer than other countries. I tried to keep the style consistent with what's already there.  We need to add this and Belarus to the docs here: https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#built-in-country-holidays
2020-03-23 16:25:12 -07:00
Ben Letham
d9bea61969 Remvoe no longer necessary test 2020-03-09 15:20:25 -07:00
Ben Letham
44ceaa8d8b Don't use tqdm with multiprocessing starmap 2020-03-09 12:48:14 -07:00
Ryan Nazareth
39c619dbf7
Running Cross-Validation with Multiprocessing Option (#1356)
* Add multiprocessing Pool and create function for single cutoff forecast

* add params to single forecast function

* Add iterable for input params for pool

* Add docstring for single cutoff forecast func

* Add check for multiprocessing in test_cross_validation

* check ofr is None and is True and add better description for multiprocess in docstring

* Raise error if wrong args chosen and add test

* fix conflicts

* Change arg to True/False, model.kwargs

* docstring units and few more fixes

* change to iterator and add back tqdm to for loop

* add option in diagnosics notebook about multiprocessing option

* add extra test for checking calls to single forecast func
2020-03-09 12:25:01 -07:00
Dmitry
fd61fcbeeb
Holidays in Belarus + codestyle (#1380)
* Holidays in Belarus + codestyle

* Correction + changing hardcode with variable
2020-03-06 18:40:58 -08:00
Ryan Nazareth
0ca50cfb7f
Extract stanfit from model object in Py following cmdstanpy refactoring (#1353)
* add self.stan_fit in fit methods

* small changes to fix tests

* make changes to remove self.params from backend classes
2020-03-06 18:11:04 -08:00