All Projects → PetoLau → Tsrepr

PetoLau / Tsrepr

Licence: gpl-3.0
TSrepr: R package for time series representations

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Tsrepr

Sktime
A unified framework for machine learning with time series
Stars: ✭ 4,741 (+6221.33%)
Mutual labels:  data-science, data-mining, time-series, time-series-analysis
Matrixprofile
A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms, accessible to everyone.
Stars: ✭ 141 (+88%)
Mutual labels:  data-science, data-mining, time-series, time-series-analysis
Elki
ELKI Data Mining Toolkit
Stars: ✭ 613 (+717.33%)
Mutual labels:  data-science, data-analysis, data-mining, time-series
Pyod
A Python Toolbox for Scalable Outlier Detection (Anomaly Detection)
Stars: ✭ 5,083 (+6677.33%)
Mutual labels:  data-science, data-analysis, data-mining
Dataexplorer
Automate Data Exploration and Treatment
Stars: ✭ 362 (+382.67%)
Mutual labels:  data-science, data-analysis, r-package
Data Science
Collection of useful data science topics along with code and articles
Stars: ✭ 315 (+320%)
Mutual labels:  data-science, data-analysis, time-series
Datascience
Curated list of Python resources for data science.
Stars: ✭ 3,051 (+3968%)
Mutual labels:  data-science, data-analysis, data-mining
Mathematicavsr
Example projects, code, and documents for comparing Mathematica with R.
Stars: ✭ 41 (-45.33%)
Mutual labels:  data-science, data-analysis, time-series
Cookbook 2nd Code
Code of the IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018 [read-only repository]
Stars: ✭ 541 (+621.33%)
Mutual labels:  data-science, data-analysis, data-mining
Pycm
Multi-class confusion matrix library in Python
Stars: ✭ 1,076 (+1334.67%)
Mutual labels:  data-science, data-analysis, data-mining
Dataproofer
A proofreader for your data
Stars: ✭ 628 (+737.33%)
Mutual labels:  data-science, data-analysis, data-mining
Ai Learn
人工智能学习路线图,整理近200个实战案例与项目,免费提供配套教材,零基础入门,就业实战!包括:Python,数学,机器学习,数据分析,深度学习,计算机视觉,自然语言处理,PyTorch tensorflow machine-learning,deep-learning data-analysis data-mining mathematics data-science artificial-intelligence python tensorflow tensorflow2 caffe keras pytorch algorithm numpy pandas matplotlib seaborn nlp cv等热门领域
Stars: ✭ 4,387 (+5749.33%)
Mutual labels:  data-science, data-analysis, data-mining
Pydataroad
open source for wechat-official-account (ID: PyDataLab)
Stars: ✭ 302 (+302.67%)
Mutual labels:  data-science, data-analysis, data-mining
Nfstream
NFStream: a Flexible Network Data Analysis Framework.
Stars: ✭ 622 (+729.33%)
Mutual labels:  data-science, data-analysis, data-mining
Cookbook 2nd
IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018
Stars: ✭ 704 (+838.67%)
Mutual labels:  data-science, data-analysis, data-mining
Urs
Universal Reddit Scraper - A comprehensive Reddit scraping command-line tool written in Python.
Stars: ✭ 275 (+266.67%)
Mutual labels:  data-science, data-analysis, data-mining
Data Science With Ruby
Practical Data Science with Ruby based tools.
Stars: ✭ 549 (+632%)
Mutual labels:  data-science, data-analysis, data-mining
Amazing Feature Engineering
Feature engineering is the process of using domain knowledge to extract features from raw data via data mining techniques. These features can be used to improve the performance of machine learning algorithms. Feature engineering can be considered as applied machine learning itself.
Stars: ✭ 218 (+190.67%)
Mutual labels:  data-science, data-analysis, data-mining
Deepgraph
Analyze Data with Pandas-based Networks. Documentation:
Stars: ✭ 232 (+209.33%)
Mutual labels:  data-science, data-analysis, data-mining
Model Describer
model-describer : Making machine learning interpretable to humans
Stars: ✭ 22 (-70.67%)
Mutual labels:  data-science, data-analysis, data-mining

TSrepr

Travis-CI Build Status CRAN_Status_Badge Downloads Downloads

codecov.io DOI

TSrepr is R package for fast time series representations and dimensionality reduction computations. Z-score normalisation, min-max normalisation, forecasting accuracy measures and other useful functions implemented in C++ (Rcpp) and R.

Installation

You can install TSrepr directly from CRAN:

install.packages("TSrepr")

Or development version from GitHub with:

# install.packages("devtools")
devtools::install_github("PetoLau/TSrepr")

Overview

All type of time series representations methods are implemented, and these are so far:

  • Nondata adaptive:
    • PAA - Piecewise Aggregate Approximation (repr_paa)
    • DWT - Discrete Wavelet Transform (repr_dwt)
    • DFT - Discrete Fourier Transform (repr_dft)
    • DCT - Discrete Cosine Transform (repr_dct)
    • SMA - Simple Moving Average (repr_sma)
    • PIP - Perceptually Important Points (repr_pip)
  • Data adaptive:
    • SAX - Symbolic Aggregate Approximation (repr_sax)
    • PLA - Piecewise Linear Approximation (repr_pla)
  • Model-based:
    • Mean seasonal profile - Average seasonal profile, Median seasonal profile, etc. (repr_seas_profile)
    • Model-based seasonal representations based on linear (additive) model (LM, RLM, L1, GAM) (repr_lm, repr_gam)
    • Exponential smoothing seasonal coefficients (repr_exp)
  • Data dictated:
    • FeaClip - Feature extraction from clipping representation (repr_feaclip, clipping)
    • FeaTrend - Feature extraction from trending representation (repr_featrend, trending)
    • FeaClipTrend - Feature extraction from clipping and trending representation (repr_feacliptrend)

Additional useful functions are implemented as:

  • Windowing (repr_windowing) - applies above mentioned representations to every window of a time series
  • Matrix of representations (repr_matrix) - applies above mentioned representations to every row of a matrix of time series
  • List of representations (repr_list) - applies above mentioned representations to every member of a list of time series with different lengths
  • Normalisation functions - z-score (norm_z), min-max (norm_min_max), arctan (norm_atan), Box-Cox (norm_boxcox), Yeo-Johnson (norm_yj)
  • Normalisation functions with output also of scaling parameters - z-score (norm_z_list), min-max (norm_min_max_list)
  • Normalisation functions with defined parameters - z-score (norm_z_params), min-max (norm_min_max_params)
  • Denormalisation functions - z-score (denorm_z), min-max (denorm_min_max), arctan (denorm_atan), Box-Cox (denorm_boxcox), Yeo-Johnson (denorm_yj)
  • Forecasting accuracy measures - MSE, MAE, RMSE, MdAE, MAPE, sMAPE, MAAPE, MASE

Usage

library(TSrepr)
library(ggplot2)

data_ts <- as.numeric(elec_load[5,]) # electricity load consumption data
# Comparison of PAA and PLA
# Dimensionality of the time series will be reduced 8 times
data_paa <- repr_paa(data_ts, q = 12, func = mean)
data_pla <- repr_pla(data_ts, times = 55, return = "both") # returns both extracted places and values

data_plot <- data.frame(value = c(data_ts, data_paa, data_pla$points),
                        time = c(1:length(data_ts), seq(6, length(data_ts), by = 12),
                                 data_pla$places),
                        type = factor(c(rep("Original", length(data_ts)),
                                        rep(c("PAA", "PLA"), each = 56))))

ggplot(data_plot, aes(time, value, color = type, size = type)) +
  geom_line(alpha = 0.8) +
  scale_size_manual(values = c(0.6, 0.8, 0.8)) +
  theme_bw()

For more information

Contact

Citation

Cite the package as:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].