croston model for intermittent time series
Project description
croston
A python package to forecast intermittent time series using croston's method
example:
import numpy as np
import random
from croston import croston
import matplotlib.pyplot as plt
a = np.zeros(50)
val = np.array(random.sample(range(100,200), 10))
idxs = random.sample(range(50), 10)
ts = np.insert(a, idxs, val)
fit_pred = croston.fit_croston(ts, 10,'original')
yhat = np.concatenate([fit_pred['croston_fittedvalues'], fit_pred['croston_forecast']])
plt.plot(ts)
plt.plot(yhat)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
croston-0.1.2.3.tar.gz
(6.5 MB
view hashes)
Built Distribution
Close
Hashes for croston-0.1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11658d3b0c1b630cdae99ac80f638dfab28e741f7661b2ba1835369b872c194c |
|
MD5 | 08776726da62af48cc78058903629dea |
|
BLAKE2b-256 | bd5ec2628cdb7ac565ccbf3c1fecf6ded70ebcb6a2f5f66fd5cf0bddf164e289 |