Skip to main content

Fast implementations of common forecasting routines

Project description

Motivation

At Nixtla we have implemented several libraries to deal with time series data. We often have to apply some transformation over all of the series, which can prove time consuming even for simple operations like performing some kind of scaling.

We've used numba to speed up our expensive computations, however that comes with other issues such as cold starts and more dependencies (LLVM). That's why we developed this library, which implements several operators in C++ to transform time series data (or other kind of data that can be thought of as independent groups), with the possibility to use multithreading to get the best performance possible.

You probably won't need to use this library directly but rather use one of our higher level libraries like mlforecast, which will use this library under the hood. If you're interested on using this library directly (only depends on numpy) you should continue reading.

Installation

PyPI

pip install coreforecast

conda-forge

conda install -c conda-forge coreforecast

Minimal example

The base data structure is the "grouped array" which holds two numpy 1d arrays:

  • data: values of the series.
  • indptr: series boundaries such that data[indptr[i] : indptr[i + 1]] returns the i-th series. For example, if you have two series of sizes 5 and 10 the indptr would be [0, 5, 15].
import numpy as np
from coreforecast.grouped_array import GroupedArray

data = np.arange(10)
indptr = np.array([0, 3, 10])
ga = GroupedArray(data, indptr)

Once you have this structure you can run any of the provided transformations, for example:

from coreforecast.lag_transforms import ExpandingMean
from coreforecast.scalers import LocalStandardScaler

exp_mean = ExpandingMean(lag=1).transform(ga)
scaler = LocalStandardScaler().fit(ga)
standardized = scaler.transform(ga)

Single-array functions

We've also implemented some functions that work on single arrays, you can refer to the following pages:

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

coreforecast-0.0.13.1.tar.gz (87.1 kB view details)

Uploaded Source

Built Distributions

coreforecast-0.0.13.1-cp313-cp313-win_amd64.whl (189.0 kB view details)

Uploaded CPython 3.13 Windows x86-64

coreforecast-0.0.13.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (273.7 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

coreforecast-0.0.13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (249.9 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

coreforecast-0.0.13.1-cp313-cp313-macosx_11_0_arm64.whl (196.0 kB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

coreforecast-0.0.13.1-cp313-cp313-macosx_10_13_x86_64.whl (248.8 kB view details)

Uploaded CPython 3.13 macOS 10.13+ x86-64

coreforecast-0.0.13.1-cp312-cp312-win_amd64.whl (188.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

coreforecast-0.0.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (274.8 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

coreforecast-0.0.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (250.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

coreforecast-0.0.13.1-cp312-cp312-macosx_11_0_arm64.whl (196.0 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

coreforecast-0.0.13.1-cp312-cp312-macosx_10_13_x86_64.whl (248.6 kB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

coreforecast-0.0.13.1-cp311-cp311-win_amd64.whl (188.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

coreforecast-0.0.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coreforecast-0.0.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (248.2 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

coreforecast-0.0.13.1-cp311-cp311-macosx_11_0_arm64.whl (196.9 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

coreforecast-0.0.13.1-cp311-cp311-macosx_10_9_x86_64.whl (248.7 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

coreforecast-0.0.13.1-cp310-cp310-win_amd64.whl (186.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

coreforecast-0.0.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coreforecast-0.0.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (247.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

coreforecast-0.0.13.1-cp310-cp310-macosx_11_0_arm64.whl (195.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

coreforecast-0.0.13.1-cp310-cp310-macosx_10_9_x86_64.whl (247.2 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

coreforecast-0.0.13.1-cp39-cp39-win_amd64.whl (182.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

coreforecast-0.0.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coreforecast-0.0.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (247.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

coreforecast-0.0.13.1-cp39-cp39-macosx_11_0_arm64.whl (195.5 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

coreforecast-0.0.13.1-cp39-cp39-macosx_10_9_x86_64.whl (247.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file coreforecast-0.0.13.1.tar.gz.

File metadata

  • Download URL: coreforecast-0.0.13.1.tar.gz
  • Upload date:
  • Size: 87.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for coreforecast-0.0.13.1.tar.gz
Algorithm Hash digest
SHA256 82cfd58e5663e082a44105ea7ad956b8324bb63e1aff224d99a9e2457b8e6914
MD5 a4a1d1586572f973d43a5d890e978f3d
BLAKE2b-256 6b2e5914f56be5dfe6eebca0136e27f96bfbccac6cd1f1c4e2edf2beaf080209

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6a7bb03c96b93c2d63e383d9d674ba395a5400dd7163696d1fdb981653482e29
MD5 ab73290c880c8fcb91cfc4323b80e8f1
BLAKE2b-256 85a46e4e58ab3ab274cc8e45b83d3a87115e2f3ecb0fafb98e707f62bfa8f688

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee93c721a9f79848bc19958c7bae7f7ca10786c4f581626951de3a5b7ea55449
MD5 8f5c4fc8329cb28df4304bfcb907aa32
BLAKE2b-256 080679924c4ed7edece4e754692c6ee9f4d5e523b5563a79b5a8bbce8b44a1a1

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6b79029e1073f728e6053533f630363318a981457904f887a8bc8af27e03d044
MD5 c66a9f41eaba9807c285849a4b25ba46
BLAKE2b-256 744285d196a46905a6d03a84ff850237bc4296b238cd7c993eeed441f1b8f899

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7bfa256e8b929081f8a4b715d741336e3188269d22e9a92d040b42196109477f
MD5 138d805ea64c2795b79b1b843ed6284b
BLAKE2b-256 09acd7c85ad9de7798c6343f2ece79fc793b5602f38e489b45f4a6485f7dc1a7

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5dc93fc7d5fc77e7d7cc572aa8ec970f78f453c659fa6bac6964d245ad70f105
MD5 6f38f3bcfa59895017bc8bc258690f5b
BLAKE2b-256 55f8318929a46e4258cdf6f7d36baa9d9266c7aeb0d0438c5f02c2927a3ee988

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a3196398dc3ef3126b5e2aa74c5840e576abfa574f2c19d101e178851a57b158
MD5 14795a9f13e6c976c9f8acee96640821
BLAKE2b-256 feae213fce20fd95fb3058181ec09704100148ae8ccb25baf88a4e7c8ef64b49

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d88cc0ae82dc5fa4fac390b35553ac869e61d06b4f9fe08e45895d3e69153c51
MD5 7bd614bd32370404b5a2057613659c17
BLAKE2b-256 a8d6ec4620507d7fb79a5e9fea5e4412be979064733d1c10b2d7adcf64b340b9

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9020bd54a3eeeb1ebe486b34c8dda6aa2fdc4287ea0aa75f2ee43219f75ccda4
MD5 8cae8f68be7497789a57e3df7506b25a
BLAKE2b-256 31b00d9a25938649532986b12627aa49e8a848a3ca3185fd75cfe1715abfdf77

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4854c7b975d33cbb7d7bde2aae2b16c32512f478dee6202b4bdc0207930f7c9
MD5 bba9807ae37472a84edb7283b867ea6d
BLAKE2b-256 7446340a77a7d821b16e5ff6b520d94929970366ae7e4788cb4e4d3d8869b779

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 64d5831195b6d871ef10eaa78d8e3d2d2944213c8f2edc5049a9e9bd6881c736
MD5 a53c67f080c069cc9d89cfc32c374488
BLAKE2b-256 d6e2a5bb926a80843ce35e42fd4d022ac1920b412de45f146305e87fce9897ab

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 db63411009da7e8b1a6cf9442b7aabefa6c215de9082d893a84e589704f75e64
MD5 344667fb24d7191acbf0ce18e886e683
BLAKE2b-256 b399141169067078bf54d76b02754cca307fa708a77010c2e0a3802aca1e386e

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2903c3e7c6873e291ca045da586ec44a38712e6bb7397687472b2f3145ef7696
MD5 bbbaab4b733cdc42ff497a274e55d0f5
BLAKE2b-256 65c80a5cca57b7f7ab0d9ead2ad57f06561ff1e78594fc68d7f69bc29244e79b

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cbdf117c71195ebfc5c2df4f909303ff1179d92d49a75cad5ce43d6a15949eae
MD5 5e47b3d1e88c54b28e771d239a0d41fa
BLAKE2b-256 f44996c3a5a249acef7ff13a7deaaf83b268abed3a97a8a5eac40f79c6367677

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9546c8a41bcf8a8e80b7d37aeac406eedd7cc9ac3f64bac5966c6f0222a49a64
MD5 cc3ee7c2b5c58b57a88408923e559f38
BLAKE2b-256 2ac48d6fbe714d8e0aa5f2800e852e1652ed95d0ca37e5ef2bb3808b642e4dbb

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 013cac058c12af039e323add9cf8bbb437e6bacde48f11cbb06a295d897b42be
MD5 e8d83024c0d2403402da236d3798dc03
BLAKE2b-256 072a050123089f7f91def5421521bfa272e6dd8a5bfd0aefa5d37df1ef32528c

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ecf2bdda60e8e52aa27e61356cf9c95354274d4a02c694578b0766b33beb0050
MD5 53f4917cdcc0830e0bb86611580967c6
BLAKE2b-256 1a145988f0ff94ec2beae8521be1fdaa8dd0a14187f2ae87920d64439d90fd9c

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b120c8dda5dafa10fdd7db08e9292a4de428ee955d5daba3db346f3b075c4c4
MD5 482a11db605c9a64f124d54b1d6dde0a
BLAKE2b-256 28ec0c7371d965d6add5ca146bb03d10d9182a1230bd4c42e6fead9398a24f28

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 66a32e817ff22cdacabb5485e20cefd4a26e44c0c4aff82ee380577fd76bd536
MD5 2cdba38b1b2d4d2d664a65766e04a250
BLAKE2b-256 bab271afe2777626a00f7561c37c107c3730cbcd19bd5a64289d89f2737931a7

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42481233236cd70b5aac3ff7efbad3f68cb5817777b99002ed07d9b1e9d06e5c
MD5 9f651f4f2c8ad97d5e8902b448d06d21
BLAKE2b-256 7939ee94dd673a87f0cb521225e5866398ebca804a1c17ed94b7fcc4537823bc

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4572a84bec17ba341c9c0c3ba05fc26170f876a274b933db4bc06154d728e400
MD5 6f40c5737b5f88cd0932e7bb7cf4aca2
BLAKE2b-256 af49b65503db194f693b8cbe954d95d30b2e07cd786d723aff37da5fd5804877

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 aefb7d6a05008dc37af5f4214f014bed5e8ab6ceba0852db399057a98bba7471
MD5 b0b20c4dedce99399c7e78f95eb6bc14
BLAKE2b-256 5f1ee28bec35ba56e0b899cc8815a5e2f5a2c0e1d11161a9347bdc95e738bbb4

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1aaa39da298cc6294f3ec83312f061ee0702def399de2bb082df8200a57d8c53
MD5 5004f9957a1ea7f0907eb6fd94910fb1
BLAKE2b-256 6f3ed60d61d00bdc90055fd93bc11435b399c8e8d5a20692f6a021c5e594c137

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 43db9dec4d3d9007523d3d5c7325e9d4386cdef289a58a4fb72a27820a1c9367
MD5 4d2e9f150d894eb1823e243002f00974
BLAKE2b-256 afd5ae2e9256e3f260f3842c4a58a0bd824450f4ea82b8dfd754ca4b5cb96856

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2804e500c5b83d929698436b02c57a38731a93f332ec084914e53e759a905b65
MD5 16fdb6a8d6cfcb44899b326371c971ef
BLAKE2b-256 a9c0a1aa6bd4ddeca017295ba95663a2fdee693713e8bdf04d8e5262dfb58942

See more details on using hashes here.

File details

Details for the file coreforecast-0.0.13.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coreforecast-0.0.13.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cc30c73f6d7cba65a47cb90203645de35c4c35f7eb82eaa495a6353d2f9d1ab8
MD5 0b72f57b024acb08230334f7dc962aea
BLAKE2b-256 61a7e5be48e1f271dc554ede43f79d89c9f2378f86d0922bfb089985a9be582a

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