Commit graph

145 commits

Author SHA1 Message Date
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
Christoph Deil
8c48f5b042
Remove logging.root basicConfig on fbprophet import (#1336) 2020-02-17 14:11:23 -08:00
Ben Letham
57990e6f50 Change backend logging from info to debug 2020-02-11 03:38:18 -08:00
Christopher Suchanek
1d18adc0ba
Replaced pystan with cmdstanpy (#1083)
* changes

* added actual tests for fit method

* precision

* syntax

* sampling not working

* sampling seems to work

* sampling not working again

* sampling works, tests to be removed

* replaced data with rmse

* replace pystan with cmdstanpy

* cleanup

* cleanup

* test for newton

* added support for multiple backends

* minor fixes

* fixed comment

* added support for --test-slow flag

* fixed import

* reverted style change

* specify backend based on env variable

* fixes

* PR fixes
2020-02-07 14:34:08 -08:00
Jack Dent
496facb152
Use np.percentile if array does not contain NaNs (#1311)
Co-authored-by: jackd-stripe <41304233+jackd-stripe@users.noreply.github.com>
2020-02-05 10:10:01 -08:00
Ben Letham
69bd5a2aac Avoid pandas deprecation warning 2020-02-04 16:00:37 -08:00
Ben Letham
6e51130f28 Use fit kwargs in cross validation (#1040) 2020-02-03 17:02:23 -08:00
Benjamin Ogorek
0a270b4a19
Minor modification in handling strings (#1301)
* Style modifications to fbprophet

* fixing cases where tests were broken

* minor style changes

* changed f-strings to named formatted strings due to Python2 build

* fixing syntax errors

* switching to formatted string quoting using {!r}

* Fixing ValueError Styling in my own branch

* fixing type and changing back one quoted string
2020-01-28 15:24:40 -08:00
Mert Sarikaya
5dd6bb09e7 remove repeated sentence in docstring 2020-01-27 14:09:29 -08:00
Ben Letham
af5bb2acda Minor fixes 2020-01-27 13:28:04 -08:00
baogorek
aee14547da fixing syntax errors 2020-01-27 13:25:56 -08:00
baogorek
d98afa0126 changed f-strings to named formatted strings due to Python2 build 2020-01-27 13:25:56 -08:00
baogorek
b1c6f5dd9b minor style changes 2020-01-27 13:25:56 -08:00
baogorek
0b6c2dc6af fixing cases where tests were broken 2020-01-27 13:25:56 -08:00
baogorek
3a6a338ac2 Style modifications to fbprophet 2020-01-27 13:25:56 -08:00
Maxim Grishin
9425b89257 Fix #1189 2019-11-06 15:23:21 -08:00
Maxim Grishin
a3ae4715bb Make Python version consistent with R 2019-10-22 17:28:27 -07:00
Maxim Grishin
05effe55ac Make StanFit4Model object accessible from Prophet 2019-10-22 17:28:27 -07:00
Florian Roessler
e1a2b9c297 updated the change a bit to prevent unnessary copy operations 2019-09-28 17:12:33 -07:00
Florian Roessler
5bc6565c11 Add test and fix for issue #891 2019-09-28 17:12:33 -07:00
Alexander Gawrilow
0679e69dba implemented disabling calculation of uncertainties if uncertainty_samples is 0 2019-08-09 12:06:24 -07:00
Daniel Scally
0e0f1a607a Adding validation to Prophet.add_seasonality to prevent user setting fourier_order <= 0 2019-05-31 10:21:09 -07:00
Alessandro Romano
b77f85ffd8 Add figsize parameter to plot methods 2019-05-23 10:29:50 -07:00
Ben Letham
7ff33137eb Change to MIT license 2019-05-21 11:40:04 -07:00
Ben Letham
fdac46ad40 Fix DeprecationWarning for float64 casting 2019-05-13 15:21:54 -07:00
Ben Letham
f660264e23 Don't allow timezones in pandas datetime 2019-05-13 15:00:45 -07:00
Ben Letham
df6bef8920 Replace to_numpy() with values to maintain pd 0.23.4 support 2019-05-13 13:51:27 -07:00
Ben Letham
28cd55241f Verify that cap > floor (#807) 2019-05-13 13:11:07 -07:00
Ben Letham
e9c017ba01 Default to Newton optimizer if less than 100 datapoints (#842, #870, #888) 2019-05-07 11:47:36 -07:00
Ben Letham
26f60c0a49 If ds column is int, convert to str before pd.to_datetime to avoid nanosecond casting (#675) 2019-05-06 16:38:13 -07:00
Ben Letham
ec7689f03e R fallback to Newton if non-zero return code from optimization, to match existing Py behavior (#654) 2019-05-06 09:49:29 -07:00
Ben Letham
7297d98764 Use OrderedDict for seasonalities (#643) 2019-05-03 10:44:23 -07:00
Ben Letham
35d470cbff Meaningful error message if predict is called before fit (for #462) 2019-05-02 14:53:57 -07:00
Jerry Prawiharjo
c11e668c0d Add logger.warning when falling back to Newton method (#950)
This adds logger.warning when we fall back to Newton method.
2019-05-02 14:34:24 -07:00
Ray Bell
f9adb9623e WIP: remove python Series.nonzero warning (#931)
* add to_numpy()

* remove .values
2019-05-02 11:51:35 -07:00
Olof Höjvall
8eea5a1ca3 Feature Proposal with Python Draft: Masked seasonality (#873)
* Added feature to mask seasonality

* Added conditional seasonality tests and fixed plotting it

* Fixed diagnostics for conditional seasonality and cleaned up code
2019-03-18 10:04:35 -07:00
MT
eec2f46ac5 if optimization fails fallback to Newton even if algorithm is specified (#890) 2019-03-18 09:41:45 -07:00
Gabriel Linder
bd0979244d Fix FutureWarning from Pandas 0.24.0. (#830)
* Fix FutureWarning from Pandas 0.24.0.

Signed-off-by: Gabriel Linder <linder.gabriel@gmail.com>

* Stay compatible with older versions of pandas.

Signed-off-by: Gabriel Linder <linder.gabriel@gmail.com>
2019-02-15 10:28:51 -08:00
Ben Letham
de5b7494de Remove pd.Series from np.matmul 2019-01-15 12:47:54 -08:00
Mpho Mphego
f16e22731f Update and rename README to README.md and Unicode strings (#766)
* Update and rename README to README.md and Unicode strings

Updated Readme file and converted from rst to markdown.
String contains ascii characters (converted to unicode string)

Signed-off-by: Mpho Mphego mpho112@gmail.com

* Deprecated import `from __future__ import unicode_literals` removed and ran isort module
https://mail.python.org/pipermail/python-dev/2016-December/147009.html

Included setuptool-git in the requirement.txt and updated `setup.py`
Reasons for this are highlighted here -> https://github.com/msabramo/setuptools-git#usage
2018-12-20 15:33:23 -08:00
Ben Letham
1d398c679d Allow overriding any of the arguments to stan functions 2018-12-03 19:05:47 -08:00
Ben Letham
f44285038c Allow setting other handlers in the logging 2018-12-03 16:29:07 -08:00
Ben Letham
13d96cff8f Fix type casting for extra regressors, and a shape issue 2018-12-03 15:22:19 -08:00
Ben Letham
91917df8f0 Handle parameter shaping with MCMC and one changepoint (#608) 2018-12-03 14:25:28 -08:00
Ben Letham
536fe931c6 Add documentation for country holidays 2018-12-03 11:54:55 -08:00
Ben Letham
287fb2f6de Move built-in country holidays to a function (R) 2018-11-30 23:12:19 -08:00
Ben Letham
92f955d25a Move built-in country holidays to a method 2018-11-30 17:20:22 -08:00
MT
ff65d1431f Fix duplicate kwarg algorithm when newton fallback is selected (#708)
* fix issue #700: duplicate kwarg algorithm

* fix spacing

* provide default to dict pop
2018-10-23 12:02:43 -07:00
S-Katagiri
e63f8cdfbd change extra_regressors to OrderedDict (#688) 2018-10-18 18:07:42 -07:00
Ben Letham
c1a3839382 Remove deprecated methods 2018-08-27 14:06:10 -07:00