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
  • cant download pygame

    cant download pygame

    Hi, im new to python and when i try to download pygame it gives me this (btw i use windows): pip install pygame Collecting pygame Using cached pygame-2.1.2.tar.gz (10.1 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

    × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [77 lines of output]

      WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
      Using WINDOWS configuration...
    
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\ramaz\AppData\Local\Temp\pip-install-nlen0vgu\pygame_3e1a5bca4820438ebe96d0f87fdaa688\setup.py", line 359, in <module>
          buildconfig.config.main(AUTO_CONFIG)
        File "C:\Users\ramaz\AppData\Local\Temp\pip-install-nlen0vgu\pygame_3e1a5bca4820438ebe96d0f87fdaa688\buildconfig\config.py", line 225, in main
          deps = CFG.main(**kwds)
                 ^^^^^^^^^^^^^^^^
        File "C:\Users\ramaz\AppData\Local\Temp\pip-install-nlen0vgu\pygame_3e1a5bca4820438ebe96d0f87fdaa688\buildconfig\config_win.py", line 511, in main
          return setup_prebuilt_sdl2(prebuilt_dir)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\ramaz\AppData\Local\Temp\pip-install-nlen0vgu\pygame_3e1a5bca4820438ebe96d0f87fdaa688\buildconfig\config_win.py", line 471, in setup_prebuilt_sdl2
          DEPS.configure()
        File "C:\Users\ramaz\AppData\Local\Temp\pip-install-nlen0vgu\pygame_3e1a5bca4820438ebe96d0f87fdaa688\buildconfig\config_win.py", line 336, in configure
          from . import vstools
        File "C:\Users\ramaz\AppData\Local\Temp\pip-install-nlen0vgu\pygame_3e1a5bca4820438ebe96d0f87fdaa688\buildconfig\vstools.py", line 11, in <module>
          compiler.initialize()
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.496.0_x64__qbz5n2kfra8p0\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 403, in initialize
          vc_env = query_vcvarsall(VERSION, plat_spec)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.496.0_x64__qbz5n2kfra8p0\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 281, in query_vcvarsall
          raise DistutilsPlatformError("Unable to find vcvarsall.bat")
      distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
      Making dir :prebuilt_downloads:
      Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.18-VC.zip ed561079ec622b0bab5a9e02976f5d540b0622da
      Unzipping :prebuilt_downloads\SDL2-devel-2.0.18-VC.zip:
      Downloading... https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip 137f86474691f4e12e76e07d58d5920c8d844d5b
      Unzipping :prebuilt_downloads\SDL2_image-devel-2.0.5-VC.zip:
      Downloading... https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zip 1436df41ebc47ac36e02ec9bda5699e80ff9bd27
      Unzipping :prebuilt_downloads\SDL2_ttf-devel-2.0.15-VC.zip:
      Downloading... https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip 9097148f4529cf19f805ccd007618dec280f0ecc
      Unzipping :prebuilt_downloads\SDL2_mixer-devel-2.0.4-VC.zip:
      Downloading... https://www.pygame.org/ftp/jpegsr9d.zip ed10aa2b5a0fcfe74f8a6f7611aeb346b06a1f99
      Unzipping :prebuilt_downloads\jpegsr9d.zip:
      Downloading... https://pygame.org/ftp/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed
      Unzipping :prebuilt_downloads\prebuilt-x64-pygame-1.9.2-20150922.zip:
      copying into .\prebuilt-x64
      Path for SDL: prebuilt-x64\SDL2-2.0.18
      ...Library directory for SDL: prebuilt-x64/SDL2-2.0.18/lib/x64
      ...Include directory for SDL: prebuilt-x64/SDL2-2.0.18/include
      Path for FONT: prebuilt-x64\SDL2_ttf-2.0.15
      ...Library directory for FONT: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64
      ...Include directory for FONT: prebuilt-x64/SDL2_ttf-2.0.15/include
      Path for IMAGE: prebuilt-x64\SDL2_image-2.0.5
      ...Library directory for IMAGE: prebuilt-x64/SDL2_image-2.0.5/lib/x64
      ...Include directory for IMAGE: prebuilt-x64/SDL2_image-2.0.5/include
      Path for MIXER: prebuilt-x64\SDL2_mixer-2.0.4
      ...Library directory for MIXER: prebuilt-x64/SDL2_mixer-2.0.4/lib/x64
      ...Include directory for MIXER: prebuilt-x64/SDL2_mixer-2.0.4/include
      Path for PORTMIDI: prebuilt-x64
      ...Library directory for PORTMIDI: prebuilt-x64/lib
      ...Include directory for PORTMIDI: prebuilt-x64/include
      DLL for SDL2: prebuilt-x64/SDL2-2.0.18/lib/x64/SDL2.dll
      DLL for SDL2_ttf: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64/SDL2_ttf.dll
      DLL for SDL2_image: prebuilt-x64/SDL2_image-2.0.5/lib/x64/SDL2_image.dll
      DLL for SDL2_mixer: prebuilt-x64/SDL2_mixer-2.0.4/lib/x64/SDL2_mixer.dll
      DLL for portmidi: prebuilt-x64/lib/portmidi.dll
      Path for FREETYPE not found.
      ...Found include dir but no library dir in prebuilt-x64.
      Path for PNG not found.
      ...Found include dir but no library dir in prebuilt-x64.
      Path for JPEG not found.
      ...Found include dir but no library dir in prebuilt-x64.
      DLL for freetype: prebuilt-x64/SDL2_ttf-2.0.15/lib/x64/libfreetype-6.dll
    
      ---
      For help with compilation see:
          https://www.pygame.org/wiki/CompileWindows
      To contribute to pygame development see:
          https://www.pygame.org/contribute.html
      ---
    
      [end of output]
    

    note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

    × Encountered error while generating package metadata. ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip. hint: See above for details.

    opened by r-3user 0
  • Something went wrong while unpickling the StanModel. Consider recompiling.

    Something went wrong while unpickling the StanModel. Consider recompiling.

    Ive been using this code for decomposition but its showing error for pystan: model_prophet = Prophet(seasonality_mode='multiplicative') Error coming out is: WARNING:pystan:No module named 'stanfit4anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec_4959769199373391054' WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.

    opened by zayyan6 0
  • module 'prophet.hdays' has no attribute 'JP'

    module 'prophet.hdays' has no attribute 'JP'

    Just started getting this error all of sudden this morning. Everything was working fine before without any issues. Any idea why all of a sudden this has become an issue?

    I have tried updating the holidays package but that doesnt seem to fix it.

    opened by 1234shel 1
  • An error of predict at prophet

    An error of predict at prophet

    Hi team, Hope that you are doing great. i'm facing a challenge in predict of prophet package. steps that i followed

    m.add_regressor('sessions') m.add_regressor('add_to_cart') m.add_regressor('begin_checkout') m.add_regressor('plp') m.add_regressor('select_item') m.add_regressor('search') m.add_regressor('delivery_continue')

    m.fit(train)

    m.params

    future = m.make_future_dataframe(periods=118) future.head()

    image

    then i added the regressors

    future['sessions'] = df1_final['sessions'] future['add_to_cart'] = df1_final['add_to_cart'] future['begin_checkout'] = df1_final['begin_checkout'] future['plp'] = df1_final['plp'] future['select_item'] = df1_final['select_item'] future['search'] = df1_final['search'] future['delivery_continue'] = df1_final['delivery_continue']

    image

    forecast = m.predict(future) forecast[['ds','yhat','yhat_lower','yhat_upper']].tail()

    and this was the output i'm facing. searched a lot but with no resolution.

    image

    opened by HadyShaaban 0
  • persistent error in MCMC sampling

    persistent error in MCMC sampling

    Hi, I am trying to run MCMC sampling on a windows machine to obtain uncertainty intervals around seasonality estimates of my historical data and I keep getting this error, no matter what dataset I use to fit the model. The fitting works perfectly if I don't set MCMC samples.

    Also, I am aware that on windows machines MCMC sampling, even when successful, takes a very long time, so I was wondering if there any other ways to get some indications of how reliable the estimation of the seasonality components are? I am using a work computer so I cannot use a virtual linux machine.

    TypeError Traceback (most recent call last) ‹ipython-input-39-ceef802c3e45> in ‹module>

    m.add _seasonality(name='avg_months', period=30.5, fourier order=5) fit=m. fit(data) forecast = m .predict()

    C: \ProgramData\Miniconda3\envs\jup385\lib\site-packages\prophet\forecaster.pyinfit(self,df,**kwargs) self.params[par] = np.array([self.params(par]]) elif self.mcmc samples > 0: self.params= self.stan_backend. sampling (stan init, dat, self.meme samples, **kwargs) else: self.params= self.stan_backend.fit(stan_init, dat, **kwargs)

    C: \ProgramData\Miniconda3\envs\jup385\lib\site-packages\prophet\models.pyin sampling(self, stan_init, stan_data, samples,**kwargs) self.stan_fit = self. model.sample(*args) res = self.stan fit.draws () (samples, c, columns) = res. shape res = res. reshape((samples C, columns)) TypeError: 'int' object is not callable

    opened by elenaAMA 0
Releases(v1.1.1)
Owner
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
Facebook
Forecast dynamically at scale with this unique package. pip install scalecast

🌄 Scalecast: Dynamic Forecasting at Scale About This package uses a scaleable forecasting approach in Python with common scikit-learn and statsmodels

Michael Keith 158 Jan 03, 2023
a distributed deep learning platform

Apache SINGA Distributed deep learning system http://singa.apache.org Quick Start Installation Examples Issues JIRA tickets Code Analysis: Mailing Lis

The Apache Software Foundation 2.7k Jan 05, 2023
Hierarchical Time Series Forecasting using Prophet

htsprophet Hierarchical Time Series Forecasting using Prophet Credit to Rob J. Hyndman and research partners as much of the code was developed with th

Collin Rooney 131 Dec 02, 2022
mlpack: a scalable C++ machine learning library --

a fast, flexible machine learning library Home | Documentation | Doxygen | Community | Help | IRC Chat Download: current stable version (3.4.2) mlpack

mlpack 4.2k Jan 01, 2023
Machine Learning Algorithms

Machine-Learning-Algorithms In this project, the dataset was created through a survey opened on Google forms. The purpose of the form is to find the p

Göktuğ Ayar 3 Aug 10, 2022
A Python toolkit for rule-based/unsupervised anomaly detection in time series

Anomaly Detection Toolkit (ADTK) Anomaly Detection Toolkit (ADTK) is a Python package for unsupervised / rule-based time series anomaly detection. As

Arundo Analytics 888 Dec 30, 2022
Decision Tree Regression algorithm implemented on Python from scratch.

Decision_Tree_Regression I implemented the decision tree regression algorithm on Python. Unlike regular linear regression, this algorithm is used when

1 Dec 22, 2021
Bayesian optimization in JAX

Bayesian optimization in JAX

Predictive Intelligence Lab 26 May 11, 2022
李航《统计学习方法》复现

本项目复现李航《统计学习方法》每一章节的算法 特点: 笔记摘要:在每个文件开头都会有一些核心的摘要 pythonic:这里会用尽可能规范的方式来实现,包括编程风格几乎严格按照PEP8 循序渐进:前期的算法会更list的方式来做计算,可读性比较强,后期几乎完全为numpy.array的计算,并且辅助详

58 Oct 22, 2021
pandas, scikit-learn, xgboost and seaborn integration

pandas, scikit-learn and xgboost integration.

299 Dec 30, 2022
CorrProxies - Optimizing Machine Learning Inference Queries with Correlative Proxy Models

CorrProxies - Optimizing Machine Learning Inference Queries with Correlative Proxy Models

ZhihuiYangCS 8 Jun 07, 2022
Bonsai: Gradient Boosted Trees + Bayesian Optimization

Bonsai is a wrapper for the XGBoost and Catboost model training pipelines that leverages Bayesian optimization for computationally efficient hyperparameter tuning.

24 Oct 27, 2022
🤖 ⚡ scikit-learn tips

🤖 ⚡ scikit-learn tips New tips are posted on LinkedIn, Twitter, and Facebook. 👉 Sign up to receive 2 video tips by email every week! 👈 List of all

Kevin Markham 1.6k Jan 03, 2023
Bayesian Additive Regression Trees For Python

BartPy Introduction BartPy is a pure python implementation of the Bayesian additive regressions trees model of Chipman et al [1]. Reasons to use BART

187 Dec 16, 2022
Python library which makes it possible to dynamically mask/anonymize data using JSON string or python dict rules in a PySpark environment.

pyspark-anonymizer Python library which makes it possible to dynamically mask/anonymize data using JSON string or python dict rules in a PySpark envir

6 Jun 30, 2022
Deploy AutoML as a service using Flask

AutoML Service Deploy automated machine learning (AutoML) as a service using Flask, for both pipeline training and pipeline serving. The framework imp

Chris Rawles 221 Nov 04, 2022
A library to generate synthetic time series data by easy-to-use factors and generator

timeseries-generator This repository consists of a python packages that generates synthetic time series dataset in a generic way (under /timeseries_ge

Nike Inc. 87 Dec 20, 2022
Provide an input CSV and a target field to predict, generate a model + code to run it.

automl-gs Give an input CSV file and a target field you want to predict to automl-gs, and get a trained high-performing machine learning or deep learn

Max Woolf 1.8k Jan 04, 2023
Sequence learning toolkit for Python

seqlearn seqlearn is a sequence classification toolkit for Python. It is designed to extend scikit-learn and offer as similar as possible an API. Comp

Lars 653 Dec 27, 2022
easyNeuron is a simple way to create powerful machine learning models, analyze data and research cutting-edge AI.

easyNeuron is a simple way to create powerful machine learning models, analyze data and research cutting-edge AI.

Neuron AI 5 Jun 18, 2022