Skip to main content

croston model for intermittent time series

Project description

croston

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

readthedocs: croston

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


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.4.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

croston-0.1.2.4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file croston-0.1.2.4.tar.gz.

File metadata

  • Download URL: croston-0.1.2.4.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for croston-0.1.2.4.tar.gz
Algorithm Hash digest
SHA256 5d2049b0846b1f1036587499b4eb69d0993fe453e7e5dab2f1ef2672ef473696
MD5 6e9b8171bcd30a9c879c1381e85691e4
BLAKE2b-256 ae051fea1dbd9f5ff7db8cb5034a43f56b4ea58eef7ce8837272c32344e408a4

See more details on using hashes here.

File details

Details for the file croston-0.1.2.4-py3-none-any.whl.

File metadata

  • Download URL: croston-0.1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for croston-0.1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e0550ebcaac4505c5bff92415d66a8e3135542af4422fc8da353f257aef684c6
MD5 c3bdfba319eeb45fae6dc5c3fb25eafb
BLAKE2b-256 d9f51dfe2127a3d080b4f0f6e51cd9f46dffa812aa444c8bfb997cb4e1ce2add

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page