# Author: Antoine Carme <antoine.carme@laposte.net>

# License: BSD 3 clause


PyAF (Python Automatic Forecasting)

===================================


PyAF is an Open Source Python library for Automatic Forecasting built on top of popular data science python modules : numpy, scipy, pandas and scikit-learn.


PyAF works as an automated process for predicting future values of a signal using a machine learning approach. It provides a set of features that is comparable to some popular commercial automatic forecasting products.


PyAF is distributed under the 3-Clause BSD license.


Features

--------

PyAF allows forecasting a time series for future values in a fully automated way.



PyAF uses Pandas as a data access layer. It consumes data from a pandas data-frame (with time and signal columns), builds a time series model, and outputs the forecasts in a pandas data-frame. Pandas is an excellent data access layer, it allows reading/writing a huge set of file formats, accessing various data sources (databases) and has an extensive set of algorithms to handle data-frames (aggregation, statistics, linear algebra, plotting etc).



PyAF statistical time series models are built/estimated/trained using scikit-learn library (http://scikit-learn.org).



The following features are available :

  1. Training a model to forecast a time series (given in a pandas data-frame with time and signal columns).

  1. Forecasting a time series model on a given horizon (forecast result is also pandas data-frame) and computes prediction/confidence intervals for the forecasts.

  2. Generic training features

  1. Exogenous Data Support

  1. PyAF implements hierarchical forecasting. It follows the excellent Rob J Hyndman and George Athanasopoulos book approach (https://www.otexts.org/fpp/9/4).

  1. The modeling process is customizable and has a huge set of options. The default values of these options should however be OK.

  2. A benchmarking process is progressing (using M1, M2, M3 competitions, NN3, NN5 data).

  3. Basic plotting functions using matplotlib with standard time series and forecasts plots.

  4. Software Quality Highlights

  1. A basic REST Web Service (Flask) effort is starting.

  2. A project for SQL generation is started (using core SLQAlchemy expressions). The goal is to be able to export the forecasts as a SQL code to ease the production mode. SLQAlchemy provides agnostic support of a large set of databases.

PyAF is a work in progress. The set of features is evolving. Your feature requests, comments, help, hints are welcome.



Installation

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


Use the source !!!!


Dependencies

~~~~~~~~~~~~


PyAF requires::


- scikit-learn.

- Pandas

- Python (>= 3.5),

- NumPy,

- SciPy.

- matplotlib

- SQLAlchemy (for code generation , optional).


Development

-----------


Code contributions are welcome. Bug reports, request for new features and documentation, tests are welcome. Please use Github platform for these tasks.


Source code

~~~~~~~~~~~


You can check the latest sources of PyAF from Github with the command::


git clone https://github.com/antoinecarme/pyaf.git



Project history

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


This project was started in summer 2016 as a POC to check the feasibility of an automatic forecasting tool based only on python available data science software (numpy, scipy, pandas, scikit-learn etc).


PyAF is provided as an open source library (BSD-3 License).


See the AUTHORS.rst file for a complete list of contributors.


Help and Support

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


PyAF is currently maintained by the original developer. PyAF support will be provided when possible.


Bug reports, Improvement requests, Documentation, Hints and Test scripts are welcome. Please use the Github platform for these tasks.


Documentation

~~~~~~~~~~~~~


The code is not yet fully documented. This is a top priority. The sample notebooks can be seen as tutorials.


Communication

~~~~~~~~~~~~~


Comments , appreciations, remarks , etc .... are welcome. Your feedback is welcome if you use this library in a project or a publication.