Skip to main content

croston model for intermittent time series

Project description


A python package to forecast intermittent time series using croston's method

readthedocs: croston


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']])


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for croston, version
Filename, size File type Python version Upload date Hashes
Filename, size croston- (3.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size croston- (6.5 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page