Demand Patterns SBC (Syntetos, Boylan, Croston) method of Categorizations
Project description
Demand Patterns SBC (Syntetos Boylan Croston) method of Categorizations
Description
This method helps classify different demand patterns (time-series patterns) into groups in order to fit the most appropriate model. More info could be found here and here
This is a Python version of the tsintermittent package in R. At the moment, only the SBC method is available.
Installation
pip install sbc-classification
Example
Test Data
Test data is the clean version of the data from M5 Forecasting Challenge competition on Kaggle. Details can be found here. The dataset was processed to make it easier to test the function.
Testing
Note: This function will not treat NA values. All the null values in the time-series should be treated separately.
from sbc import sbc_class.sbc_class
df = pd.read_csv("./tests/data/sales_train_clean.csv")
## multiple targets
out = sbc_class.(df.iloc[:, 1:], plot_type = 'summary')
## 1 target
out1 = sbc_class.(df.iloc[:, 1], plot_type = 'summary')
print(out)
print(out1)
If plot_type is not None, output would be a plot and a dataframe of target_name, p, CV squared and classified model type for multiple targets
If plot_type is summary then the plot would be a matrix diagram of numbers of time-series in each category
If plot_type is bar then the plot would be bar chart of numbers of time-series in each demand patterns
Please give the package a star if you find it helpful :)
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sbc-classification-0.0.4.tar.gz.
File metadata
- Download URL: sbc-classification-0.0.4.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5426b22087952c3de3a02bc0cf90bce5ddcc1de96de0b9f8285cbe3a3150e06d
|
|
| MD5 |
641ebcb5d74c54720edddfb9ea14299b
|
|
| BLAKE2b-256 |
e1a18ad3fd24666414e5549ddb6b55eede44fcba2502e107c2e0567125104ca9
|
File details
Details for the file sbc_classification-0.0.4-py3-none-any.whl.
File metadata
- Download URL: sbc_classification-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c002c32270de32f2dff8022066277652cfd0777ac499941c35f3c177a005dcf8
|
|
| MD5 |
fd4272eafee2fba3e71c3e67e0cc9955
|
|
| BLAKE2b-256 |
fe1e531ad181eb20395ab54955b6f5a3b7693be50b279972b0ea65b6777eeddf
|