Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

Overview

Prophet: Automatic Forecasting Procedure

Build Pypi_Version Conda_Version

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.

Prophet is open source software released by Facebook's Core Data Science team. It is available for download on CRAN and PyPI.

Important links

Installation in R

Prophet is a CRAN package so you can use install.packages.

install.packages('prophet')

After installation, you can get started!

Windows

On Windows, R requires a compiler so you'll need to follow the instructions provided by rstan. The key step is installing Rtools before attempting to install the package.

If you have custom Stan compiler settings, install from source rather than the CRAN binary.

Installation in Python

Prophet is on PyPI, so you can use pip to install it. From v0.6 onwards, Python 2 is no longer supported.

# Install pystan with pip before using pip to install fbprophet
pip install pystan

pip install fbprophet

The default dependency that Prophet has is pystan. PyStan has its own installation instructions. Install pystan with pip before using pip to install fbprophet.

You can also choose a (more experimental) alternative stan backend called cmdstanpy. It requires the CmdStan command line interface and you will have to specify the environment variable STAN_BACKEND pointing to it, for example:

# bash
$ CMDSTAN=/tmp/cmdstan-2.22.1 STAN_BACKEND=CMDSTANPY pip install fbprophet

Note that the CMDSTAN variable is directly related to cmdstanpy module and can be omitted if your CmdStan binaries are in your $PATH.

It is also possible to install Prophet with two backends:

# bash
$ CMDSTAN=/tmp/cmdstan-2.22.1 STAN_BACKEND=PYSTAN,CMDSTANPY pip install fbprophet

After installation, you can get started!

If you upgrade the version of PyStan installed on your system, you may need to reinstall fbprophet (see here).

Anaconda

Use conda install gcc to set up gcc. The easiest way to install Prophet is through conda-forge: conda install -c conda-forge fbprophet.

Windows

On Windows, PyStan requires a compiler so you'll need to follow the instructions. The easiest way to install Prophet in Windows is in Anaconda.

Linux

Make sure compilers (gcc, g++, build-essential) and Python development tools (python-dev, python3-dev) are installed. In Red Hat systems, install the packages gcc64 and gcc64-c++. If you are using a VM, be aware that you will need at least 4GB of memory to install fbprophet, and at least 2GB of memory to use fbprophet.

Changelog

Version 0.6 (2020.03.03)

  • Fix bugs related to upstream changes in holidays and pandas packages.
  • Compile model during first use, not during install (to comply with CRAN policy)
  • cmdstanpy backend now available in Python
  • Python 2 no longer supported

Version 0.5 (2019.05.14)

  • Conditional seasonalities
  • Improved cross validation estimates
  • Plotly plot in Python
  • Bugfixes

Version 0.4 (2018.12.18)

  • Added holidays functionality
  • Bugfixes

Version 0.3 (2018.06.01)

  • Multiplicative seasonality
  • Cross validation error metrics and visualizations
  • Parameter to set range of potential changepoints
  • Unified Stan model for both trend types
  • Improved future trend uncertainty for sub-daily data
  • Bugfixes

Version 0.2.1 (2017.11.08)

  • Bugfixes

Version 0.2 (2017.09.02)

  • Forecasting with sub-daily data
  • Daily seasonality, and custom seasonalities
  • Extra regressors
  • Access to posterior predictive samples
  • Cross-validation function
  • Saturating minimums
  • Bugfixes

Version 0.1.1 (2017.04.17)

  • Bugfixes
  • New options for detecting yearly and weekly seasonality (now the default)

Version 0.1 (2017.02.23)

  • Initial release

License

Prophet is licensed under the MIT license.

Comments
  • Command

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-BqMhb7/matplotlib/

    Hi I try to install the package neuralpy in Python2.7 using this command in terminal

    pip install neuralpy

    And I got this error message

    python setup.py egg_info" failed with error code 1 in /tmp/pip-build-BqMhb7/matplotlib/

    Help me pleeeeeeeeeeeeease :+1:

    opened by gith77 151
  • Simplify setup.py, make CmdStan the default backend

    Simplify setup.py, make CmdStan the default backend

    Working wheels (cmdstanpy only): https://github.com/WardBrian/prophet/actions/runs/1855227353

    This WIP PR would be the next step for #2041.

    Currently it:

    1. Makes the repackaging of CmdStan reproducible (doesn't assume an existing installation), and optional (can be disabled with environment variable PROPHET_REPACKAGE_CMDSTAN=false)
    2. Checks to see if cmdstan was repackaged before setting the cmdstan path
    3. Simplifies setup.py accordingly
    4. Makes CMDSTANPY the default backend
    5. Removes the distinction between the unix and windows model, as cmdstanpy can compile the "unix" model on all platforms

    I'd like to test the current setup and wheel builds, hence this PR and the changes to the github actions files. I am still waiting to hear back from my company about the CLA, so this might sit as a draft until after the holidays.

    Still yet to be done: 5. Refactor to remove PyStan entirely

    CLA Signed 
    opened by WardBrian 54
  • Cannot use 'pip install fbprophet'  to install prophet on windows 10 with python 3.6.0

    Cannot use 'pip install fbprophet' to install prophet on windows 10 with python 3.6.0

    Already installed python 3.60, pystan and Visual C++ 2015 Build Tools-win10

    error message as follow after I use pip install fbprophet:

    Command "d:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\lwx\\AppData\\Local\\Temp\\pip-build-phg6epsq\\fbprophet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\lwx\AppData\Local\Temp\pip-6ts715hu-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\lwx\AppData\Local\Temp\pip-build-phg6epsq\fbprophet\

    And I tried to install from source code which I download from https://pypi.python.org/pypi/fbprophet/0.1.post1 Use python setup.py install and error message as follows:

    c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2784: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const T1 &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'Eigen::Matrix<stan::math::var,-1,-1,0,-1,-1>' d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(72): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2784: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const T2 &)': could not deduce template argument for 'const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'stan::math::var' d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(50): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2784: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &' from 'stan::math::var' d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(27): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'elt_multiply': no matching overloaded function found c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'stan::math::add': no matching overloaded function found c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const T1 &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': expects 2 arguments - 1 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(72): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const T2 &)': expects 2 arguments - 1 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(50): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'Eigen::Matrix<boost::math::tools::promote_args<RT1,RT2,float,float,float,float>::type,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> stan::math::add(const Eigen::Matrix<T1,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &,const Eigen::Matrix<T2,R,C,|_Rows==&&_Cols!=?:_Cols==&&_Rows!=?:,_Rows,_Cols> &)': expects 2 arguments - 1 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/mat/fun/add.hpp(27): note: see declaration of 'stan::math::add' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'normal_log': no matching overloaded function found c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2974: 'stan::math::normal_log': invalid template argument for 'T_y', type expected d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/scal/prob/normal_log.hpp(120): note: see declaration of 'stan::math::normal_log' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2780: 'return_type<T_y,T_loc,T_scale,double,double,double>::type stan::math::normal_log(const T_y &,const T_loc &,const T_scale &)': expects 3 arguments - 2 provided d:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\lib\stan_math_2.14.0\stan/math/prim/scal/prob/normal_log.hpp(44): note: see declaration of 'stan::math::normal_log' c:\users\lwx\appdata\local\temp\tmp4z5vcu1o\anon_model_35bf14a7f93814266f16b4cf48b40a5a.hpp(368): error C2672: 'stan::math::accumulator<T__>::add': no matching overloaded function found with [ T__=stan::math::var ] error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    py 
    opened by moshlwx 53
  • Command

    Command "python setup.py egg_info" failed with error code 1

    When I run $ pip install fbprophet on Python 2.7.13, macOS 10.12.4, I get the following error:

    Collecting fbprophet
      Using cached fbprophet-0.1.post1.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/v9/5n8070c96854w3mhd9knc73w0000gn/T/pip-build-zZTmYY/fbprophet/setup.py", line 96, in <module>
            """
          File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
            _setup_distribution = dist = klass(attrs)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/dist.py", line 318, in __init__
            self.fetch_build_eggs(attrs['setup_requires'])
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/dist.py", line 373, in fetch_build_eggs
            replace_conflicting=True,
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/pkg_resources/__init__.py", line 851, in resolve
            dist = best[req.key] = env.best_match(req, ws, installer)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1123, in best_match
            return self.obtain(req, installer)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1135, in obtain
            return installer(requirement)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/dist.py", line 441, in fetch_build_egg
            return cmd.easy_install(req)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 674, in easy_install
            return self.install_item(spec, dist.location, tmpdir, deps)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 700, in install_item
            dists = self.install_eggs(spec, download, tmpdir)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 881, in install_eggs
            return self.build_and_install(setup_script, setup_base)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1120, in build_and_install
            self.run_setup(setup_script, setup_base, args)
          File "/Users/skurilyak/Envs/prophet/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1108, in run_setup
            raise DistutilsError("Setup script exited with %s" % (v.args[0],))
        distutils.errors.DistutilsError: Setup script exited with Cython>=0.22 and NumPy are required.
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/v9/5n8070c96854w3mhd9knc73w0000gn/T/pip-build-zZTmYY/fbprophet/
    
    opened by slavakurilyak 39
  • KeyError: 'metric_file'

    KeyError: 'metric_file'

    Hi!

    Version 0.7.1 of Prophet is unusable for me. Even if I use it in the most basic way, it constantly produces an error.

    from fbprophet import Prophet
    p = Prophet()
    p.fit(df)
    

    Error:

    KeyError: 'metric_file' Exception ignored in: 'stanfit4anon_model_f5236004a3fd5b8429270d00efcc0cf9_7332008770348935536._set_stanargs_from_dict' KeyError: metric_file

    Process finished with exit code -1073741819 (0xC0000005)

    OS: Windows 10 Python: 3.7

    Thanks for help! 👍

    Best regards Robert

    opened by Garve 35
  • Python3.7.0: Something went wrong while unpickling the StanModel. Consider recompiling.

    Python3.7.0: Something went wrong while unpickling the StanModel. Consider recompiling.

    OS: Windows 7 Professional

    First of all, I have read through related threads #249 #252 and #599, but still cannot figure out how to solve this issue.

    I understand that the easiest way to install fbprophet is to run conda install -c conda-forge fbprophet but for reasons I don't know, it takes forever for conda to solve the environment. It's not the case if I use conda to install other packages. So instead I used pip and it reported that fbprophet 0.4 was installed successfully. But I then got the following error message when importing fbprophet WARNING:pystan:No module named 'stanfit4anon_model_861b75c6337e237650a61ae58c4385ef_2841341000846931969' WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.

    Before installing fbprophet, I followed this instruction to install pystan and checked that pystan is working properly. By running the following code. import pystan model_code = 'parameters {real y;} model {y ~ normal(0,1);}' model = pystan.StanModel(model_code=model_code) # this will take a minute y = model.sampling(n_jobs=1).extract()['y'] y.mean() # should be close to 0

    I got message like

    Gradient evaluation took 0 seconds 1000 transitions using 10 leapfrog steps per transition would take 0 seconds. Adjust your expectations accordingly!

    Iteration: 1 / 2000 [ 0%] (Warmup) Iteration: 200 / 2000 [ 10%] (Warmup) Iteration: 400 / 2000 [ 20%] (Warmup) Iteration: 600 / 2000 [ 30%] (Warmup) Iteration: 800 / 2000 [ 40%] (Warmup) Iteration: 1000 / 2000 [ 50%] (Warmup) Iteration: 1001 / 2000 [ 50%] (Sampling) Iteration: 1200 / 2000 [ 60%] (Sampling) Iteration: 1400 / 2000 [ 70%] (Sampling) Iteration: 1600 / 2000 [ 80%] (Sampling) Iteration: 1800 / 2000 [ 90%] (Sampling) Iteration: 2000 / 2000 [100%] (Sampling)

    Elapsed Time: 0.01 seconds (Warm-up) 0.01 seconds (Sampling) 0.02 seconds (Total)

    I uninstalled both pystan and fbprophet and then reinstalled them with --no-cache flag. But fbprophet still didn't work.

    bug ready 
    opened by shil3754 33
  • R crashes when fitting in a loop

    R crashes when fitting in a loop

    Hi

    When I run a loop of prophet models I get an "R session terminated" in Rstudio. The intervals are random. Either the first or the nth model crash. I read a whole number of posts for the same issue but I found no solution. I tried the: devtools::install_github('facebookincubator/prophet', subdir='R', ref='loop_debug') devtools::install_github('facebookincubator/prophet', subdir='R') loading rstan and rcpp before prophet, although I could make prophet work without these besides the crash. Another thing is that the same code used to run in my stolen work laptop(i5/8G/128SSD) while my brand new work pc (i7/16G/256SSD) suffers from the crashes. Any ideas? Thanks George

    bug ready 
    opened by gkourogiorgas 32
  • Cannot use 'pip install fbprophet' to install prophet on mac

    Cannot use 'pip install fbprophet' to install prophet on mac

    Failed building wheel for fbprophet Running setup.py clean for fbprophet Failed to build fbprophet Installing collected packages: fbprophet Running setup.py install for fbprophet ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-1Wz6u0/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-fHkhKl-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib creating build/lib/fbprophet creating build/lib/fbprophet/stan_models INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_35bf14a7f93814266f16b4cf48b40a5a NOW. error: command 'cc' failed with exit status 1

    ----------------------------------------
    

    Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-1Wz6u0/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-fHkhKl-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-1Wz6u0/fbprophet/

    opened by l0vest0rm 32
  • predict error: Length of passed values is..., index implies 26

    predict error: Length of passed values is..., index implies 26

    Any help on the following. This didn't happen before the previous update of fbprophet.

    Traceback (most recent call last): File "forecast.py", line 19, in forecast = m.predict(future) File "lib/python3.6/site-packages/fbprophet/forecaster.py", line 1138, in predict intervals = self.predict_uncertainty(df) File "lib/python3.6/site-packages/fbprophet/forecaster.py", line 1340, in predict_uncertainty sim_values = self.sample_posterior_predictive(df) File "lib/python3.6/site-packages/fbprophet/forecaster.py", line 1304, in sample_posterior_predictive s_m=component_cols['multiplicative_terms'], File "lib/python3.6/site-packages/fbprophet/forecaster.py", line 1372, in sample_model Xb_a = np.matmul(seasonal_features.values, beta * s_a) * self.y_scale File "lib/python3.6/site-packages/pandas/core/series.py", line 648, in array_wrap copy=False).finalize(self) File "lib/python3.6/site-packages/pandas/core/series.py", line 262, in init .format(val=len(data), ind=len(index))) ValueError: Length of passed values is 3106, index implies 26

    Process finished with exit code 1

    opened by LakshmikanthanSrikanthan 28
  • Extension to hourly components?

    Extension to hourly components?

    First, prophet is super cool! I'm already playing around with some health related data. I have intraday data, but it looks like prophet doesn't really care, and only wants daily data. Has there been discussion of allowing for intraday data?

    enhancement ready 
    opened by CamDavidsonPilon 28
  • install errors upon building wheel

    install errors upon building wheel

    I had fbprophet installed fine at the beginning of the day (it was running fine yesterday), but per issue #363 I hastily uninstalled it after I was getting errors when trying to pull data from BigQuery using pandas gbq. I tried re-installing fbprohpet, and now I'm unable to install it, due to issues building wheel. I've tried the fixes outlined in issues #201 and #499 but they don't work for me, and I'm still having issues.

    When I run

    conda install -c conda-forge fbprophet

    Everything seems to install fine, however when I start a session of python and attempt to import fbprophet, it errors out and says no module exists.

    When I run:

    pip install fbprophet

    The output is the following:

      Using cached https://files.pythonhosted.org/packages/83/a1/a39be1675a62597e4c0d4fdaeb65b14752b8aa8afc92e90edd91614353ab/fbprophet-0.3.post2.tar.gz
    Requirement already satisfied: Cython>=0.22 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (0.28.5)
    Requirement already satisfied: pystan>=2.14 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (2.18.0.0)
    Requirement already satisfied: numpy>=1.10.0 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (1.15.1)
    Requirement already satisfied: pandas>=0.20.1 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (0.23.4)
    Requirement already satisfied: matplotlib>=2.0.0 in ./anaconda3/lib/python3.6/site-packages (from fbprophet) (2.2.3)
    Requirement already satisfied: pytz>=2011k in ./anaconda3/lib/python3.6/site-packages (from pandas>=0.20.1->fbprophet) (2018.4)
    Requirement already satisfied: python-dateutil>=2.5.0 in ./anaconda3/lib/python3.6/site-packages (from pandas>=0.20.1->fbprophet) (2.7.3)
    Requirement already satisfied: cycler>=0.10 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
    Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (2.2.0)
    Requirement already satisfied: six>=1.10 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.11.0)
    Requirement already satisfied: kiwisolver>=1.0.1 in ./anaconda3/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.0.1)
    Requirement already satisfied: setuptools in ./anaconda3/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (40.4.3)
    Building wheels for collected packages: fbprophet
      Running setup.py bdist_wheel for fbprophet ... error
      Complete output from command /Users/tricia.scully/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-wheel-b0o81h9g --python-tag cp36:
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib
      creating build/lib/fbprophet
      creating build/lib/fbprophet/stan_model
      DIAGNOSTIC(S) FROM PARSER:
      Warning: left-hand side variable (name=cp_idx) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
      Warning: left-hand side variable (name=m_pr) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
    
      INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
      error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1
    
      ----------------------------------------
      Failed building wheel for fbprophet
      Running setup.py clean for fbprophet
    Failed to build fbprophet
    Installing collected packages: fbprophet
      Running setup.py install for fbprophet ... error
        Complete output from command /Users/tricia.scully/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-record-zzklwiv6/install-record.txt --single-version-externally-managed --compile:
        running install
        running build
        running build_py
        creating build
        creating build/lib
        creating build/lib/fbprophet
        creating build/lib/fbprophet/stan_model
        DIAGNOSTIC(S) FROM PARSER:
        Warning: left-hand side variable (name=cp_idx) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
        Warning: left-hand side variable (name=m_pr) occurs on right-hand side of assignment, causing inefficient deep copy to avoid aliasing.
    
        INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW.
        error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1
    
        ----------------------------------------
    Command "/Users/tricia.scully/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-record-zzklwiv6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/6g/scqk5wfs1xx08y5xp3j67_0m0000gp/T/pip-install-sosyjw4v/fbprophet/ ```
    opened by triciascully 26
  • [Feature request][Python] Custom/Specific Exceptions instead of using simply Exception

    [Feature request][Python] Custom/Specific Exceptions instead of using simply Exception

    It would be great if there could be specifc excpetions in the code instead of always raising Exception.

    This could be helpful when doing benchamarking with different paramenters and models. In my code, I am iterating through models and I would love to catch the "Prophet object can only be fit once." or the "Model has not been fit." general exceptions.

    Having a ModelFitError , for instance, could help to do the following:

    
    for model in models:
        try:
            future = model.fit(df)
            forecast = model.predict(future)
        except ModelFitError:
            forecast = model.predict(future)
    
    

    Basic example here, but I think it can be beneficial for more complex scenarios where model, future and forecast are part of a class. Or the error can be passed when re-running the cell on a notebook.

    opened by lucianosrp 0
  • `Prophet().fit()` method only works with date and not datetime?

    `Prophet().fit()` method only works with date and not datetime?

    I am working on a project where the time axis is a timestamp. Two data points differ by a 5 minute interval.

    |index|df|y| |---|---|---| |0|2022-01-01 00:00:00+00:00|5.93| |1|2022-01-01 00:05:00+00:00|5.93| |2|2022-01-01 00:10:00+00:00|5.92| |3|2022-01-01 00:15:00+00:00|5.93| |4|2022-01-01 00:20:00+00:00|5.92|

    When I run the prophet model, I get the following error:

    m = Prophet()
    m.fit(train_df)
    

    ValueError: Dataframe must have columns "ds" and "y" with the dates and values respectively.

    opened by bhattbhuwan13 0
  • Getting varying results on running Prophet on different times of the day on Databricks

    Getting varying results on running Prophet on different times of the day on Databricks

    Hi, I am using parallel processing to run Prophet model on a set of combination of variables with one prophet model fit on one type of variable combination on Databricks using a spark dataframe for faster computation.

    For eg, if I have 500 different types of combinations, I run 500 prophet models each fit on a different type of combination. Each model is fit and predictions are made parallelly for multiple prophet models at time and at the end all the outputs from all the models are collated to give one output. But what I have noticed is when I run the same code, let's say once in the morning and once at night, I get quite different predictions on both the occasions. Same happens on running the code on different days as well. Can someone please explain any reason behind this?

    opened by PranavGuptInd 0
  • Incorporating categorical values in the Prophet model

    Incorporating categorical values in the Prophet model

    Hello,

    I have a dataset that has time series data along with 5 categorical features. I want my model to take the values in these categories into account when making a forecast.

    Do you know if there is any way to do this ? Is it possible to incorporate the categorical values in one single model so that I won't have to train a model for each combination of the values in these 5 categories ?

    opened by ozyurtf 0
  • Program stalls when it runs to an end.

    Program stalls when it runs to an end.

    Hi, everyone, I am new here. Recently, I adopted prophet to do some forecast in stock market. It goes smoothly most of the time, but I encounter some problems from time to time because my program, specifically, one of the processes (I should mention that I use multi-process to accelerate the speed) seemed fail to exit after running to the end. It seemed to relate with the workload because I hardly encounter such problem when the workload is low (ie, fewer iterations on my parameter space), but it appears more often when the workload is relatively large. In addition, I initially ran my program in Jupyter Notebook, so later I ran that in the Linux terminal and I found that such problems reduce by some degree but it still occurred some time. I am quite confused and bothered about this, can anyone help me out? Many thanks! My backend is pystan, as is suggested by the author, maybe related to some faults in pystan?

    opened by fatherofczy 3
Releases(v1.1.1)
Owner
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
Facebook
Kats is a toolkit to analyze time series data, a lightweight, easy-to-use, and generalizable framework to perform time series analysis.

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.

Facebook Research 4k Sep 26, 2022
A data preprocessing package for time series data. Design for machine learning and deep learning.

A data preprocessing package for time series data. Design for machine learning and deep learning.

Allen Chiang 146 Sep 18, 2022
Multiple Linear Regression using the LinearRegression class from sklearn.linear_model library

Multiple-Linear-Regression-master - A python program to implement Multiple Linear Regression using the LinearRegression class from sklearn.linear model library

Kushal Shingote 1 Feb 6, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Sep 21, 2022
A machine learning toolkit dedicated to time-series data

tslearn The machine learning toolkit for time series analysis in Python Section Description Installation Installing the dependencies and tslearn Getti

null 2.3k Sep 27, 2022
A machine learning toolkit dedicated to time-series data

tslearn The machine learning toolkit for time series analysis in Python Section Description Installation Installing the dependencies and tslearn Getti

null 2.2k Sep 23, 2022
STUMPY is a powerful and scalable Python library for computing a Matrix Profile, which can be used for a variety of time series data mining tasks

STUMPY STUMPY is a powerful and scalable library that efficiently computes something called the matrix profile, which can be used for a variety of tim

TD Ameritrade 2.4k Sep 29, 2022
Automatically build ARIMA, SARIMAX, VAR, FB Prophet and XGBoost Models on Time Series data sets with a Single Line of Code. Now updated with Dask to handle millions of rows.

Auto_TS: Auto_TimeSeries Automatically build multiple Time Series models using a Single Line of Code. Now updated with Dask. Auto_timeseries is a comp

AutoViz and Auto_ViML 486 Sep 30, 2022
Visualize classified time series data with interactive Sankey plots in Google Earth Engine

sankee Visualize changes in classified time series data with interactive Sankey plots in Google Earth Engine Contents Description Installation Using P

Aaron Zuspan 74 Sep 7, 2022
MaD GUI is a basis for graphical annotation and computational analysis of time series data.

MaD GUI Machine Learning and Data Analytics Graphical User Interface MaD GUI is a basis for graphical annotation and computational analysis of time se

Machine Learning and Data Analytics Lab FAU 8 Aug 25, 2022
PyPOTS - A Python Toolbox for Data Mining on Partially-Observed Time Series

A python toolbox/library for data mining on partially-observed time series, supporting tasks of forecasting/imputation/classification/clustering on incomplete multivariate time series with missing values.

Wenjie Du 117 Sep 21, 2022
Open source time series library for Python

PyFlux PyFlux is an open source time series library for Python. The library has a good array of modern time series models, as well as a flexible array

Ross Taylor 2k Sep 21, 2022
Automatic extraction of relevant features from time series:

tsfresh This repository contains the TSFRESH python package. The abbreviation stands for "Time Series Feature extraction based on scalable hypothesis

Blue Yonder GmbH 6.7k Sep 30, 2022
A unified framework for machine learning with time series

Welcome to sktime A unified framework for machine learning with time series We provide specialized time series algorithms and scikit-learn compatible

The Alan Turing Institute 5.7k Sep 27, 2022
A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.

pmdarima Pmdarima (originally pyramid-arima, for the anagram of 'py' + 'arima') is a statistical library designed to fill the void in Python's time se

alkaline-ml 1.3k Sep 29, 2022
Probabilistic time series modeling in Python

GluonTS - Probabilistic Time Series Modeling in Python GluonTS is a Python toolkit for probabilistic time series modeling, built around Apache MXNet (

Amazon Web Services - Labs 3k Sep 25, 2022
A python library for easy manipulation and forecasting of time series.

Time Series Made Easy in Python darts is a python library for easy manipulation and forecasting of time series. It contains a variety of models, from

Unit8 4.7k Sep 23, 2022
A Python package for time series classification

pyts: a Python package for time series classification pyts is a Python package for time series classification. It aims to make time series classificat

Johann Faouzi 1.3k Sep 22, 2022
Time series forecasting with PyTorch

Our article on Towards Data Science introduces the package and provides background information. Pytorch Forecasting aims to ease state-of-the-art time

Jan Beitner 2.3k Oct 2, 2022