https://github.com/microprediction/successor
Predicts the next number in a sequence, or next k
https://github.com/microprediction/successor
Last synced: 4 months ago
JSON representation
Predicts the next number in a sequence, or next k
- Host: GitHub
- URL: https://github.com/microprediction/successor
- Owner: microprediction
- License: mit
- Created: 2021-10-12T23:55:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-26T16:01:11.000Z (over 3 years ago)
- Last Synced: 2024-12-17T03:12:54.375Z (4 months ago)
- Language: Python
- Size: 59.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# successor     
Uses pre-trained tensorflow models to predict the next k entries in a sequence
## Install
pip install successor
You may get better performance by first installing tensorflow following the [instructions](https://www.tensorflow.org/install) and perhaps
reading this [thread](https://stackoverflow.com/questions/66092421/how-to-rebuild-tensorflow-with-the-compiler-flags).## Use
See [basic_use](https://github.com/microprediction/successor/tree/main/examples/basic_use.py)
# 1. Import a skater
from successor.skaters.scalarskaters.scalartsaskaters import successor_tsa_aggressive_d0_ensemble as f# 2. Univariate data
import numpy as np
y = list(np.cumsum(np.random.randn(1000)))# 3. Initialize state to empty dict
s = {}# 4. Give it some data (observations) one at a time, each time passing it back the state s
for yi in y:
x, x_std, s = f(y=yi,s=s,k=1)Skaters follow the convention established by the [timemachines](https://github.com/microprediction/timemachines) library and you are encouraged to read the description of
the "skater" signature if anything is confusing.## Side effect
Dumps tensorflow model files to disk.
## Benchmarking
See [Elo ratings](https://microprediction.github.io/timeseries-elo-ratings/html_leaderboards/univariate-k_001.html)