[SciPy-Dev] Prediction framework for (time) series

Thomas Spura thomas.spura at gmail.com
Sat Mar 14 10:24:53 EDT 2015


Dear list,

I like to add a prediction framework to the interpolation module and
submitted pull request #4632 [1]. After a first review by Ralf Gommers, I'm
writing here to discuss the broader applicability of this method and the
possible API.

There are two additions for now:
- The `Cache` class that keeps track of the last n values of the data, that
can be added with a `.add` method and the new value in the series can be
predicted with `.predict`. This class should be independant of the method
to predict the new value in the series, so also other methods such as
splines could be added in principle so it can be applied to various cases
from molecular dynamics to stock marked prediction.
- The `always_stable_projector` method takes a given series and tries to
predict the next value in the row with the method of Kolafa [2]. One
feature is that it is designed to be time reversible, which makes it
favorable to use it in molecular dynamics. For other problems, splines
might be better, so how about the following prediction framework:

* Adding the current `predict.py` as `_predict.py` to the interpolate
module.
* Rename the class to `Predict` and a `method` keyword to the constructor,
similar to what `scipy.optimize.minimize` does.

Do you think this would be usefull to add to scipy?

Greetings,
    Thomas

[1] https://github.com/scipy/scipy/pull/4632
[2] http://dx.doi.org/10.1002/jcc.10385
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150314/fb29eb9a/attachment.html>


More information about the SciPy-Dev mailing list