coreforecast


Namecoreforecast JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://nixtla.github.io/coreforecast
SummaryFast implementations of common forecasting routines
upload_time2024-04-10 21:37:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache-2.0
keywords forecasting time-series
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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](https://numba.pydata.org/) 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](https://nixtlaverse.nixtla.io/mlforecast/docs/how-to-guides/lag_transforms_guide.html#built-in-transformations-experimental), 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
```python
pip install coreforecast
```

### conda-forge
```python
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].

```python
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:

```python
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:

* [differences](https://nixtlaverse.nixtla.io/coreforecast/differences)
* [scalers](https://nixtlaverse.nixtla.io/coreforecast/scalers)
* [seasonal](https://nixtlaverse.nixtla.io/coreforecast/seasonal)

            

Raw data

            {
    "_id": null,
    "home_page": "https://nixtla.github.io/coreforecast",
    "name": "coreforecast",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "forecasting time-series",
    "author": null,
    "author_email": "Jos\u00e9 Morales <jmoralz92@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/84/05/579050c004fcd74917c335805339467fbc3f6d37a22b0518802155bdcaa4/coreforecast-0.0.8.tar.gz",
    "platform": null,
    "description": "## Motivation\nAt 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.\n\nWe've used [numba](https://numba.pydata.org/) 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.\n\nYou probably won't need to use this library directly but rather use one of our higher level libraries like [mlforecast](https://nixtlaverse.nixtla.io/mlforecast/docs/how-to-guides/lag_transforms_guide.html#built-in-transformations-experimental), 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.\n\n## Installation\n\n### PyPI\n```python\npip install coreforecast\n```\n\n### conda-forge\n```python\nconda install -c conda-forge coreforecast\n```\n\n## Minimal example\nThe base data structure is the \"grouped array\" which holds two numpy 1d arrays:\n\n* **data**: values of the series.\n* **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].\n\n```python\nimport numpy as np\nfrom coreforecast.grouped_array import GroupedArray\n\ndata = np.arange(10)\nindptr = np.array([0, 3, 10])\nga = GroupedArray(data, indptr)\n```\n\nOnce you have this structure you can run any of the provided transformations, for example:\n\n```python\nfrom coreforecast.lag_transforms import ExpandingMean\nfrom coreforecast.scalers import LocalStandardScaler\n\nexp_mean = ExpandingMean(lag=1).transform(ga)\nscaler = LocalStandardScaler().fit(ga)\nstandardized = scaler.transform(ga)\n```\n\n## Single-array functions\nWe've also implemented some functions that work on single arrays, you can refer to the following pages:\n\n* [differences](https://nixtlaverse.nixtla.io/coreforecast/differences)\n* [scalers](https://nixtlaverse.nixtla.io/coreforecast/scalers)\n* [seasonal](https://nixtlaverse.nixtla.io/coreforecast/seasonal)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Fast implementations of common forecasting routines",
    "version": "0.0.8",
    "project_urls": {
        "Documentation": "https://nixtla.github.io/coreforecast",
        "Homepage": "https://nixtla.github.io/coreforecast",
        "Repository": "https://github.com/Nixtla/coreforecast"
    },
    "split_keywords": [
        "forecasting",
        "time-series"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3df65622efd44a26538fbefe55f66a0c4a3f36e864a4118d4b5f132a36515da2",
                "md5": "fb201a2633f817b9b0e4666d917309d0",
                "sha256": "599ca1dd0d8f41396c47107ecc9ce777769d6572f8c2a4494d9688a2e4424895"
            },
            "downloads": -1,
            "filename": "coreforecast-0.0.8-py3-none-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fb201a2633f817b9b0e4666d917309d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 370834,
            "upload_time": "2024-04-10T21:37:45",
            "upload_time_iso_8601": "2024-04-10T21:37:45.277066Z",
            "url": "https://files.pythonhosted.org/packages/3d/f6/5622efd44a26538fbefe55f66a0c4a3f36e864a4118d4b5f132a36515da2/coreforecast-0.0.8-py3-none-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "408b8ef69867dd916b1df7ceec87a1585c3c864b88023bcef1c5063137c21aef",
                "md5": "c976b9b923729c4a46f5c119ec3772a7",
                "sha256": "e5c2a1983465563ca2d3078f6ba449214e20eef5056013a62893cd6958cd7497"
            },
            "downloads": -1,
            "filename": "coreforecast-0.0.8-py3-none-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "c976b9b923729c4a46f5c119ec3772a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 315983,
            "upload_time": "2024-04-10T21:37:47",
            "upload_time_iso_8601": "2024-04-10T21:37:47.348470Z",
            "url": "https://files.pythonhosted.org/packages/40/8b/8ef69867dd916b1df7ceec87a1585c3c864b88023bcef1c5063137c21aef/coreforecast-0.0.8-py3-none-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e04754604c65c2bff66e240290ccb86c8778bc12eca3461ab2e3031e668191b3",
                "md5": "906dc3fc663c5cceb30e5f800efa2e42",
                "sha256": "1f6ca35496eaada7cbb4b3f07dde2a9612b9c8ae849f2e02dc54e1c528c42248"
            },
            "downloads": -1,
            "filename": "coreforecast-0.0.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "906dc3fc663c5cceb30e5f800efa2e42",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 193482,
            "upload_time": "2024-04-10T21:37:49",
            "upload_time_iso_8601": "2024-04-10T21:37:49.265637Z",
            "url": "https://files.pythonhosted.org/packages/e0/47/54604c65c2bff66e240290ccb86c8778bc12eca3461ab2e3031e668191b3/coreforecast-0.0.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abebef87a22b49ff6f80e16b844646f254c1061d0917758dd22786b889f60b9f",
                "md5": "bb4039016b11c557988c7f88af50afae",
                "sha256": "155104b5077fa6b44fc23c3761cca24343cfda0203574a2b7104cc7ee609e5a7"
            },
            "downloads": -1,
            "filename": "coreforecast-0.0.8-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "bb4039016b11c557988c7f88af50afae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 86316,
            "upload_time": "2024-04-10T21:37:51",
            "upload_time_iso_8601": "2024-04-10T21:37:51.088783Z",
            "url": "https://files.pythonhosted.org/packages/ab/eb/ef87a22b49ff6f80e16b844646f254c1061d0917758dd22786b889f60b9f/coreforecast-0.0.8-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8405579050c004fcd74917c335805339467fbc3f6d37a22b0518802155bdcaa4",
                "md5": "eacfb61307511dda85d8703c7f21f8be",
                "sha256": "c352306fadf1faa52c68170abbd9ef6b5cb95fec8a0667206e4efe0f397b7f9b"
            },
            "downloads": -1,
            "filename": "coreforecast-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "eacfb61307511dda85d8703c7f21f8be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 38075,
            "upload_time": "2024-04-10T21:37:52",
            "upload_time_iso_8601": "2024-04-10T21:37:52.387725Z",
            "url": "https://files.pythonhosted.org/packages/84/05/579050c004fcd74917c335805339467fbc3f6d37a22b0518802155bdcaa4/coreforecast-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 21:37:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Nixtla",
    "github_project": "coreforecast",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "coreforecast"
}
        
Elapsed time: 0.23517s