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 thei-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
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
Built Distributions
File details
Details for the file coreforecast-0.0.13.tar.gz
.
File metadata
- Download URL: coreforecast-0.0.13.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ae89af366e30e01947b5b0cecb28768d92d55b8e03cca344860029377ab1f7f |
|
MD5 | 08ce1e95468f26b06b3930d6a937c017 |
|
BLAKE2b-256 | d69a9a661a952c3102384ae1f5c0815587d901da85e945d8fff7c72d72d76a85 |
File details
Details for the file coreforecast-0.0.13-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 188.9 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 475253f379cd6cc7f843ecb8e45a1665658e9dfb0186718fbdd1fdfbef167d94 |
|
MD5 | dd2e9c19183f855452171d55b8f650f4 |
|
BLAKE2b-256 | 19a1c1f8353fd6f2ae5f6165d3841d3cbc4f1580d30aec76750e9e0864155dea |
File details
Details for the file coreforecast-0.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 273.7 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5d9e0fb4c744613172f0cf934f8e4c8a5f756e241119ddc8f136792cf472cba |
|
MD5 | 26d069b18b76392bb5f81f5a679ea22f |
|
BLAKE2b-256 | 65520502e6df195b005c9eb0ba26bf24f4ecd1afa09dc0058982d287b66e0b05 |
File details
Details for the file coreforecast-0.0.13-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 249.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db3b637f558e7a6967f75d805d82179dca5c6162dcc07f09cd884cc1ab8e6170 |
|
MD5 | e136633f367b488f96cc5e882e13dbb9 |
|
BLAKE2b-256 | 1eab32f3ac05dc54e7861c92c7c2146267093d18e19d7bfc0119b37b28b20e57 |
File details
Details for the file coreforecast-0.0.13-cp313-cp313-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 196.0 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9246083e3525788022bd9abeee5553630b8f377a4708656f4075bbdbd3e05b05 |
|
MD5 | fbfd29c33dca0c87334b4e26ea7bf53e |
|
BLAKE2b-256 | e875b74572ed02309b69f4d469cad13651bf0dc6f3e71153c12f1f48f7753f03 |
File details
Details for the file coreforecast-0.0.13-cp313-cp313-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 248.7 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb54a4dab28ec72d776e77679f27eb6484a96a80511b834b22ae51f4f1ba5079 |
|
MD5 | 23559cdbab6d386459f028c46cf414ab |
|
BLAKE2b-256 | 1ba76fd647d015da11013c2e73d264cc225c8435cd0225b301ac6217726011b0 |
File details
Details for the file coreforecast-0.0.13-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 188.9 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f99e518e60d79487c3e5666456eb455f8fd6103f1d1500d0b0d82c3c28a8026 |
|
MD5 | b1f308215db246e8dcdb2fd0423c71d4 |
|
BLAKE2b-256 | 9f92bf7a5bd79323539817504a4a16b341e6261c185645150b1e61204e9488e4 |
File details
Details for the file coreforecast-0.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 274.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c207e64ade1eaf5f7180481f2e67528f6cf4d2f7f194d581f04e3b5159cbb645 |
|
MD5 | 69c4f4883e4b76bbb4972445c4c590f9 |
|
BLAKE2b-256 | e37b9f84482500ad254ec4875113806c5dbbf1031d6154e041e5bc468c50bed2 |
File details
Details for the file coreforecast-0.0.13-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 250.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd7c302db06061f12bd5739c77aad718bdac992b7d4f7a1b77d05096fbac27db |
|
MD5 | 39a1d9ee87068b79bec642ee6751e4ef |
|
BLAKE2b-256 | 9b22ec918c890712fe7d462865bb399a2ed4b16aee86bd464b3d3927acb0984d |
File details
Details for the file coreforecast-0.0.13-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 195.9 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd346b309fb0d3e5bba89a2654f81f8b3c748ae7a29e47bc3b6980c2a8edb47f |
|
MD5 | 5a58636e27d6dc29b10036b1459cc820 |
|
BLAKE2b-256 | f736d1e7de76a99ec2010b2d4a327dc799f16ca34629d00216fdfda072d9c969 |
File details
Details for the file coreforecast-0.0.13-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 248.6 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb83bd8ba7a1c0926b08c91b0a2e36f32185122232a3c1705b5adc4bcf4f1bce |
|
MD5 | 27234e27818d7b6339d2a7e1b4c5cc84 |
|
BLAKE2b-256 | aba8b927aad0e3221c8aedbb2dea9db24e52920d92d72c06e452551c55b39949 |
File details
Details for the file coreforecast-0.0.13-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 188.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d73e0a0c5f4a9792175156d501296a9187d647b7efedf2f8f3326836187323b4 |
|
MD5 | bc033887d7341913b68fe1ec51d58d31 |
|
BLAKE2b-256 | 73bd28497fde9fc1bf6d184c0eda50d14263debeecc123424cb520ac08fc9c85 |
File details
Details for the file coreforecast-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 272.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b63b0b25cddb7e7c660b5cd779dac8f03183cbeb018ba131dcbe33dcffd3db5 |
|
MD5 | 9db514fe4d9c56f719e3a4a9306a4bca |
|
BLAKE2b-256 | 02713e4da3392f78f8088c402405c5cf7e390e56adf040c07bf932cf03cea23b |
File details
Details for the file coreforecast-0.0.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 248.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07244eb162a88cd971e32f0ec066438322603fde4ade0b5fd04d608ac33d12da |
|
MD5 | 481bf085fcf2550380d2e264fb4f7cdc |
|
BLAKE2b-256 | a05ca25a9caf12fdf4c8014b9bd96c5c44b9d08f9cf719d367b43a8870013574 |
File details
Details for the file coreforecast-0.0.13-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 196.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 888c610da9fd824bdf61d4355374aca168e18585c37c4cff3b85c40b438aa14d |
|
MD5 | 24a53d96a5c4a0222a93055197558f62 |
|
BLAKE2b-256 | 464cb3142e65c0afb24a8c98566a9e0eb165822de4e37ad6d22431782d9c44cc |
File details
Details for the file coreforecast-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 248.7 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0d8c96d51fe73a2b6d1e69fc37a00775c1aa52d920d86c6a0e68dc269b73952 |
|
MD5 | 3f6469b2cea53fb95b47c4b687f9cd86 |
|
BLAKE2b-256 | 2ea69c0b920e3cbc714cfc530585a3c2b11086f7aa418534b5bdc07843711b1b |
File details
Details for the file coreforecast-0.0.13-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 186.9 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4930da91bf1cd71deea8e9f90793d95ef375e0ae2442619e67367949d55570b |
|
MD5 | 36c05488b01d4bc92ed8961946097b48 |
|
BLAKE2b-256 | 57adc5a06047aee5cac65f9eb71d8ec4cca158af5f5eb40c1404e332c87665a7 |
File details
Details for the file coreforecast-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 271.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 837c212c98aa17cdc538c746d4b318298c9c91649b390cfaea29c8beaed25fa6 |
|
MD5 | f8e10393897c34ce9febff7902dc06df |
|
BLAKE2b-256 | fd7ba81474f60a994edf63d36de6fcf5e73e30bcb2887290af40cdc1aa4e3c08 |
File details
Details for the file coreforecast-0.0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 247.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90dea116f507db8f80bef27d59d481a1aa7ab7f7c001f663df3df93a75405e90 |
|
MD5 | de3e69433aae9f468107879a4677960d |
|
BLAKE2b-256 | 7e6e2351ad2815c00a8e9173835960eefee9f18861ed3a49d70870e6310fc988 |
File details
Details for the file coreforecast-0.0.13-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 195.3 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fcc2ee897cbfbdded1277b44bebf187a74a94c78bf5c69a7aabcf42536521b4 |
|
MD5 | 3b7772ec58bd9a562de190e44286cf1e |
|
BLAKE2b-256 | 162ea65a195ae615b538c054e2c38346ac6b3f81496f14b9760286ab15777fb4 |
File details
Details for the file coreforecast-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 247.2 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae16481b50ddeda600e8c7083d47f499f1925698788602d939fbe7ae7f3ac07c |
|
MD5 | 4944b8639db56dd0d43c0d848c1f0076 |
|
BLAKE2b-256 | 12852a0cfc1a7eba6d97422447773cdc3114b6b1753a930039c65f036443713e |
File details
Details for the file coreforecast-0.0.13-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 182.8 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd6d7be8a41f08fe0a10c1b964f81e3d0c2f62ee245a4650b5e35a0e9da30ae3 |
|
MD5 | 57ee60f09b78b833acb2b89577bddbf6 |
|
BLAKE2b-256 | 0283fdfffdb456e2bd39cf0dd13e7ee23be9131de0c3068a51eddfb2fe6db3a1 |
File details
Details for the file coreforecast-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 271.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d460dcb0c7ba6f8eb7f50eccb95b9fc750feb102104ed05aeb81775db371ec |
|
MD5 | 816197c9e8c132b1eb57897601485921 |
|
BLAKE2b-256 | fd20e99425782e03385da9d56b5573a3404fab8f907be839b3ea8f86559d6de0 |
File details
Details for the file coreforecast-0.0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 247.3 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6f9b54f3f8984f32f946ef42f842338ddcbe38b3f3920c78fc48bd205b088d3 |
|
MD5 | 7a7d08b4f0c804b507fed7420c74db3e |
|
BLAKE2b-256 | d939dcc65aea3916af1a95a4e6a73b3e6f839fa087bb09409cee1db2efffef19 |
File details
Details for the file coreforecast-0.0.13-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 195.4 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 018fb5d1bdea85331b29c9641ae486d36fce974bbe4fc0a549db5fcac435390b |
|
MD5 | 28508344f0a88256a053065f0491ecd0 |
|
BLAKE2b-256 | 6f69315e2a7e6052d8a4235f74d10e159ac1f5cdd5f15cd61d716d07e42f15c3 |
File details
Details for the file coreforecast-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coreforecast-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 247.3 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0450b59eba701334b88aa8aa78ee545dd283187c67b1d4950586d67d01db572 |
|
MD5 | 37a4e98cfc85aae03e65a96258a668e2 |
|
BLAKE2b-256 | 603ea4faeef4922f71280a7ca34c4951d84f0ec2773a114c07eebd353d037c43 |