mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-09-16 22:20:23 +00:00
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
This commit is contained in:
parent
211f30039a
commit
f16e22731f
10 changed files with 77 additions and 96 deletions
|
|
@ -1,46 +0,0 @@
|
|||
Prophet: Automatic Forecasting Procedure
|
||||
========================================
|
||||
|
||||
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 <https://code.facebook.com/projects/>`_ released by Facebook's `Core Data Science team <https://research.fb.com/category/data-science/>`_.
|
||||
|
||||
Full documentation and examples available at the homepage: https://facebook.github.io/prophet/
|
||||
|
||||
Important links
|
||||
---------------
|
||||
|
||||
- HTML documentation: https://facebook.github.io/prophet/docs/quick_start.html
|
||||
- Issue tracker: https://github.com/facebook/prophet/issues
|
||||
- Source code repository: https://github.com/facebook/prophet
|
||||
- Implementation of Prophet in R: https://cran.r-project.org/package=prophet
|
||||
|
||||
|
||||
Other forecasting packages
|
||||
--------------------------
|
||||
|
||||
- Rob Hyndman's `forecast package <http://robjhyndman.com/software/forecast/>`_
|
||||
- `Statsmodels <http://statsmodels.sourceforge.net/>`_
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
::
|
||||
|
||||
$ pip install fbprophet
|
||||
|
||||
|
||||
Note: Installation requires PyStan, which has its `own installation instructions <http://pystan.readthedocs.io/en/latest/installation_beginner.html>`_. On Windows, PyStan requires a compiler so you'll need to `follow the instructions<http://pystan.readthedocs.io/en/latest/windows.html>`_. The key step is installing a recent `C++ compiler <http://landinghub.visualstudio.com/visual-cpp-build-tools>`_.
|
||||
|
||||
Example usage
|
||||
-------------
|
||||
|
||||
::
|
||||
|
||||
>>> from fbprophet import Prophet
|
||||
>>> m = Prophet()
|
||||
>>> m.fit(df) # df is a pandas.DataFrame with 'y' and 'ds' columns
|
||||
>>> future = m.make_future_dataframe(periods=365)
|
||||
>>> m.predict(future)
|
||||
|
||||
38
python/README.md
Normal file
38
python/README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Prophet: Automatic Forecasting Procedure
|
||||
|
||||
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](https://code.facebook.com/projects/>) released by [Facebook's Core Data Science team ](https://research.fb.com/category/data-science/).
|
||||
|
||||
Full documentation and examples available at the homepage: https://facebook.github.io/prophet/
|
||||
|
||||
## Important links
|
||||
|
||||
- HTML documentation: https://facebook.github.io/prophet/docs/quick_start.html
|
||||
- Issue tracker: https://github.com/facebook/prophet/issues
|
||||
- Source code repository: https://github.com/facebook/prophet
|
||||
- Implementation of Prophet in R: https://cran.r-project.org/package=prophet
|
||||
|
||||
## Other forecasting packages
|
||||
|
||||
- Rob Hyndman's [forecast package](http://robjhyndman.com/software/forecast/)
|
||||
- [Statsmodels](http://statsmodels.sourceforge.net/)
|
||||
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
pip install fbprophet
|
||||
```
|
||||
Note: Installation requires PyStan, which has its [own installation instructions](http://pystan.readthedocs.io/en/latest/installation_beginner.html).
|
||||
On Windows, PyStan requires a compiler so you'll need to [follow the instructions](http://pystan.readthedocs.io/en/latest/windows.html).
|
||||
The key step is installing a recent [C++ compiler](http://landinghub.visualstudio.com/visual-cpp-build-tools)
|
||||
|
||||
### Example usage
|
||||
|
||||
```python
|
||||
>>> from fbprophet import Prophet
|
||||
>>> m = Prophet()
|
||||
>>> m.fit(df) # df is a pandas.DataFrame with 'y' and 'ds' columns
|
||||
>>> future = m.make_future_dataframe(periods=365)
|
||||
>>> m.predict(future)
|
||||
```
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -5,14 +6,11 @@
|
|||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
from functools import reduce
|
||||
import logging
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -5,31 +6,22 @@
|
|||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
from collections import defaultdict, OrderedDict
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from collections import OrderedDict, defaultdict
|
||||
from datetime import timedelta
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pystan # noqa F401
|
||||
|
||||
|
||||
from fbprophet.diagnostics import prophet_copy
|
||||
from fbprophet.models import prophet_stan_model
|
||||
from fbprophet.make_holidays import get_holiday_names, make_holidays_df
|
||||
from fbprophet.plot import (
|
||||
plot,
|
||||
plot_components,
|
||||
plot_forecast_component,
|
||||
seasonality_plot_df,
|
||||
plot_weekly,
|
||||
plot_yearly,
|
||||
plot_seasonality,
|
||||
)
|
||||
from fbprophet.models import prophet_stan_model
|
||||
from fbprophet.plot import (plot, plot_components, plot_forecast_component,
|
||||
plot_seasonality, plot_weekly, plot_yearly,
|
||||
seasonality_plot_df)
|
||||
|
||||
logger = logging.getLogger('fbprophet')
|
||||
logger.addHandler(logging.NullHandler())
|
||||
|
|
@ -420,14 +412,14 @@ class Prophet(object):
|
|||
|
||||
def construct_holiday_dataframe(self, dates):
|
||||
"""Construct a dataframe of holiday dates.
|
||||
|
||||
|
||||
Will combine self.holidays with the built-in country holidays
|
||||
corresponding to input dates, if self.country_holidays is set.
|
||||
|
||||
|
||||
Parameters
|
||||
----------
|
||||
dates: pd.Series containing timestamps used for computing seasonality.
|
||||
|
||||
|
||||
Returns
|
||||
-------
|
||||
dataframe of holiday dates, in holiday dataframe format used in
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -5,17 +6,15 @@
|
|||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
from holidays import HolidayBase, MONDAY, WEEKEND, rd, easter
|
||||
from lunardate import LunarDate
|
||||
import warnings
|
||||
from calendar import Calendar
|
||||
from datetime import date, timedelta
|
||||
from convertdate.islamic import to_gregorian, from_gregorian
|
||||
import warnings
|
||||
|
||||
from convertdate.islamic import from_gregorian, to_gregorian
|
||||
from holidays import MONDAY, WEEKEND, HolidayBase, easter, rd
|
||||
from lunardate import LunarDate
|
||||
|
||||
|
||||
# Official public holidays at a country level
|
||||
|
|
@ -927,7 +926,7 @@ class Turkey(HolidayBase):
|
|||
self[date(year, 5, 1)] = name
|
||||
|
||||
# Commemoration of Atatürk, Youth and Sports Day
|
||||
name = "Commemoration of Atatürk, Youth and Sports Day"
|
||||
name = u"Commemoration of Atatürk, Youth and Sports Day"
|
||||
self[date(year, 5, 19)] = name
|
||||
|
||||
# Democracy and National Unity Day
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -5,16 +6,15 @@
|
|||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import warnings
|
||||
import holidays as hdays_part1
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
import fbprophet.hdays as hdays_part2
|
||||
import holidays as hdays_part1
|
||||
|
||||
|
||||
def get_holiday_names(country):
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -5,12 +6,10 @@
|
|||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import pickle
|
||||
|
||||
import pkg_resources
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -5,10 +6,7 @@
|
|||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ matplotlib>=2.0.0
|
|||
lunardate>=0.1.5
|
||||
convertdate>=2.1.2
|
||||
holidays>=0.9.5
|
||||
setuptools-git>=1.2
|
||||
|
|
@ -10,6 +10,7 @@ from pkg_resources import (
|
|||
require,
|
||||
)
|
||||
from setuptools import setup
|
||||
# from setuptools import setup, find_packages
|
||||
from setuptools.command.build_py import build_py
|
||||
from setuptools.command.develop import develop
|
||||
from setuptools.command.test import test as test_command
|
||||
|
|
@ -104,12 +105,13 @@ setup(
|
|||
author='Sean J. Taylor <sjt@fb.com>, Ben Letham <bletham@fb.com>',
|
||||
author_email='sjt@fb.com',
|
||||
license='BSD',
|
||||
# packages=find_packages(),
|
||||
packages=['fbprophet', 'fbprophet.tests'],
|
||||
setup_requires=[
|
||||
],
|
||||
install_requires=install_requires,
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
# include_package_data=True,
|
||||
# For Python 3, Will enforce that tests are run after a build.
|
||||
use_2to3=True,
|
||||
cmdclass={
|
||||
|
|
|
|||
Loading…
Reference in a new issue