A scikit-learn estimator which wraps another estimator to provide facilities for time series problems where previous predictions are used as features.
Description
When calling model.fit(X,y), y with time lag 1 is appended to X
before fitting the model.
When calling model.predict(X), for each sample in X, the prediction uses the previous known value for y (either true or predicted) as an additional feature.
Usage
This estimator implements the standard estimator API. As
such, it should play nice with other scikit-learn objects
Example of wrapping an existing estimator:
>>> from sklearn.linear_model import LinearRegression
from progestimator.prog_regression import ProgressiveRegression
y = np.array([[1.0], [3.0], [4.0], [7.0], [15.0], [31.0]])
X = np.ones(([1.0], [1.0], [1.0], [1.0], [1.0], [1.0]])
model = ProgressiveRegression(LinearRegression())
model.fit(X,y)
>>> model.predict(([1.0], [1.0], [1.0], [1.0], [1.0], [1.0]]))
array([[ 64.98224852],
[ 137.08896047],
[ 290.09172322],
[ 614.74728963],
[1303.63182285],
[2765.37143003]])
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file scikit-learn-progestimator-0.1.0.tar.gz.
File metadata
- Download URL: scikit-learn-progestimator-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a6dfe10b84dfdd69d0df38dd3b6e54edd654efa1abb2030f915e15d36e04e1
|
|
| MD5 |
3208734efef362eed799e862fc204125
|
|
| BLAKE2b-256 |
0e7d401cdda8c4b9bbd6cfb00823f0f41ee80c1adecb765bad2f148585e3e6fa
|