GithubHelp home page GithubHelp logo

fagan2888 / anticipy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sky-uk/anticipy

0.0 0.0 0.0 577 KB

A Python library for time series forecasting

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

anticipy's Introduction

Latest Release Build Status Documentation Status Code Coverage pulls

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   model             y  is_actuals
   0  2018-01-01       y  0.000000e+00        True
   1  2018-01-02       y  1.000000e+00        True
   2  2018-01-03       y  2.000000e+00        True
   3  2018-01-04       y  3.000000e+00        True
   4  2018-01-05       y  4.000000e+00        True
   5  2018-01-01  linear  5.551115e-17       False
   6  2018-01-02  linear  1.000000e+00       False
   7  2018-01-03  linear  2.000000e+00       False
   8  2018-01-04  linear  3.000000e+00       False
   9  2018-01-05  linear  4.000000e+00       False
   10 2018-01-06  linear  5.000000e+00       False
   11 2018-01-07  linear  6.000000e+00       False

Documentation is available in Read the Docs

anticipy's People

Contributors

capelastegui avatar bezes avatar slenas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.