Giter Club home page Giter Club logo

ts-pymfe's Introduction

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:

  1. General
  2. Local statistics
  3. Global statistics
  4. Statistical tests
  5. Autocorrelation
  6. Frequency domain
  7. Information theory
  8. Randomize
  9. Landmarking
  10. 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

  1. T.S. Talagala, R.J. Hyndman and G. Athanasopoulos. Meta-learning how to forecast time series (2018)..
  2. 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).
  3. 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)
  4. 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).
  5. 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

  1. Hyndman, R.J., & Athanasopoulos, G. (2018) Forecasting: principles and practice, 2nd edition, OTexts: Melbourne, Australia. OTexts.com/fpp2. Accessed on April 29 2020.

Packages

  1. tsfeatures (R language)
  2. hctsa (Matlab language)

Data

Data sampled from: https://comp-engine.org/

ts-pymfe's People

Contributors

felsiq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.