Univariate time-series expansion for Pymfe package
Project description
ts-pymfe
A backup for the pymfe expansion for time-series data. Currently, this repository contains the methods for meta-feature extraction and an modified pymfe core to run extract the meta-features.
Please note that tspymfe is not intended to be a stand-alone package, and will be oficially merged (hopefully soon) to the original Pymfe package. Until then, this package is available as a beta version.
There is 149 distinct metafeature extraction methods in this version, distributed in the following groups:
- General
- Local statistics
- Global statistics
- Statistical tests
- Autocorrelation
- Frequency domain
- Information theory
- Randomize
- Landmarking
- Model based
Install
From pip:
pip install -U tspymfe
or:
python3 -m pip install -U tspymfe
Usage
To extract the meta-features, the API behaves pretty much like the original Pymfe API:
import pymfe.tsmfe
import numpy as np
# random time-series
ts = 0.3 * np.arange(100) + np.random.randn(100)
extractor = pymfe.tsmfe.TSMFE()
extractor.fit(ts)
res = extractor.extract()
print(res)
Dev-install
If you downloaded directly from github, install the required packages using:
pip install -Ur requirements.txt
You can run some test scripts:
python test_a.py <data_id> <random_seed> <precomp 0/1>
python test_b.py <data_id> <random_seed> <precomp 0/1>
Where the first argument is the test time-series id (check data/comp-engine-export-sample.20200503.csv file.) and must be between 0 (inclusive) and 19 (also inclusive), the random seed must be an integer, and precomp is a boolean argument ('0' or '1') to activate the precomputation methods, used to calculate common values between various methods and, therefore, speed the main computations.
Example:
python test_a.py 0 16 1
python test_b.py 0 16 1
The code format style is checked using flake8, pylint and mypy. You can use the Makefile to run all verifications by yourself:
pip install -Ur requirements-dev.txt
make code-check
Main references
Papers
- T.S. Talagala, R.J. Hyndman and G. Athanasopoulos. Meta-learning how to forecast time series (2018)..
- Kang, Yanfei., Hyndman, R.J., & Smith-Miles, Kate. (2016). Visualising Forecasting Algorithm Performance using Time Series Instance Spaces (Department of Econometrics and Business Statistics Working Paper Series 10/16).
- C. Lemke, and B. Gabrys. Meta-learning for time series forecasting and forecast combination (Neurocomputing Volume 73, Issues 10–12, June 2010, Pages 2006-2016)
- B.D. Fulcher and N.S. Jones. hctsa: A computational framework for automated time-series phenotyping using massive feature extraction. Cell Systems 5, 527 (2017).
- B.D. Fulcher, M.A. Little, N.S. Jones. Highly comparative time-series analysis: the empirical structure of time series and their methods. J. Roy. Soc. Interface 10, 83 (2013).
Books
Packages
Data
Data sampled from: https://comp-engine.org/
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
Built Distribution
File details
Details for the file tspymfe-0.0.3.tar.gz
.
File metadata
- Download URL: tspymfe-0.0.3.tar.gz
- Upload date:
- Size: 109.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6d1fb9cd51f888c7349a905f4a22002f3385eeff9b3c62747f1e397bfcb0312 |
|
MD5 | a730c4c037d344d67abed90b93589ce5 |
|
BLAKE2b-256 | 8ddbc7b8f5c2448d265fd3245d90fdd2a229d48632c59055958434fd6b806f74 |
File details
Details for the file tspymfe-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: tspymfe-0.0.3-py3-none-any.whl
- Upload date:
- Size: 121.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec19791926fa0a40494c79db7bd6cf4b986e662dc531c5c9bd17a01663d5d337 |
|
MD5 | 1ef8dbdad7bf58d2d022f37afae7f4cd |
|
BLAKE2b-256 | 23ce7d58547c073efcdf5860f5b5b9485fe41b7d2f55c97303644e686c305e98 |