Skip to main content

croston model for intermittent time series

Project description

croston

A 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)

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

Uploaded Source

Built Distribution

croston-0.1.2.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: croston-0.1.2.2.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for croston-0.1.2.2.tar.gz
Algorithm Hash digest
SHA256 96ae67bb8c0cebfc9c81fd0ebdd56501dd193d8ec6e65b3a18c6892c92af40a2
MD5 36c9f1309bfe3c6925f079d66bdac542
BLAKE2b-256 87d28ad73f6b225b5781963dbdca29df0abd4c0e2386b3a646828b01bcc2d771

See more details on using hashes here.

File details

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

File metadata

  • Download URL: croston-0.1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for croston-0.1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06a31493994b7846ddd5566260b9259de734ff884dcc949aed3a3a5fd988ddce
MD5 59cdc3bb3b9639a38281a50323cac5d6
BLAKE2b-256 9f6aaf6d5db2fe68a260f80e570f42e4b8874b25a84dcc1ccd13dd72d137c5c7

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