Anticipy
Anticipy is a tool to generate forecasts for time series. It takes a pandas Series or DataFrame as input, and returns a DataFrame with the forecasted values for a given period of time.
Features:
- Simple interface. Start forecasting with a single function call on a pandas DataFrame.
- Model selection. If you provide different multiple models (e.g. linear, sigmoidal, exponential), the tool will compare them and choose the best fit for your data.
- Trend and seasonality. Support for weekly and monthly seasonality, among other types.
- Calendar events. Provide lists of special dates, such as holiday seasons or bank holidays, to improve model performance.
- Data cleaning. The library has tools to identify and remove outliers, and to detect and handle step changes in the data.
It is straightforward to generate a simple linear model with the tool - just call forecast.run_forecast(my_dataframe): ::
import pandas as pd, numpy as np from anticipy import forecast
df = pd.DataFrame({'y': np.arange(0., 5)}, index=pd.date_range('2018-01-01', periods=5, freq='D')) df_forecast = forecast.run_forecast(df, extrapolate_years=1) print(df_forecast.head(12))
Output: ::
. date source is_actuals model y q5 q20 q80 q95
0 2018-01-01 src True actuals 0.0 NaN NaN NaN NaN
1 2018-01-02 src True actuals 1.0 NaN NaN NaN NaN
2 2018-01-03 src True actuals 2.0 NaN NaN NaN NaN
3 2018-01-04 src True actuals 3.0 NaN NaN NaN NaN
4 2018-01-05 src True actuals 4.0 NaN NaN NaN NaN
5 2018-01-01 src False linear 0.0 NaN NaN NaN NaN
6 2018-01-02 src False linear 1.0 NaN NaN NaN NaN
7 2018-01-03 src False linear 2.0 NaN NaN NaN NaN
8 2018-01-04 src False linear 3.0 NaN NaN NaN NaN
9 2018-01-05 src False linear 4.0 NaN NaN NaN NaN
10 2018-01-06 src False linear 5.0 5.0 5.0 5.0 5.0
11 2018-01-07 src False linear 6.0 6.0 6.0 6.0 6.0
Documentation is available in Read the Docs <https://anticipy.readthedocs.io/en/latest/>_
Release files for anticipy 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anticipy-0.2.1.tar.gz | 70.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anticipy-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.3 kB
Release files / anticipy-0.2.1.tar.gz
| Download URL | anticipy-0.2.1.tar.gz |
|---|---|
| Size | 70.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adf5e2ee1d831a72a8fb77c533cff37220d772cd7b06186cced2e99834a0f7eb
|
|
BLAKE2b-256 checksum How to use checksums |
3138be6fd7eb64c91b8f788942ebd2c889ce2763e8494137d0a5c232fd379f80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
|
Release files / anticipy-0.2.1-py3-none-any.whl
| Download URL | anticipy-0.2.1-py3-none-any.whl |
|---|---|
| Size | 74.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0739500f688b863df5f286d7de62d4e48af0a16cc2eeb136bbd80f3307b1543a
|
|
BLAKE2b-256 checksum How to use checksums |
a1fa407513cfd84f8c967a757204b425ec8e573a059f259d9f2810b38525afff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
|