TSrepr - R package for time series representations

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

Installation

You can installTSrepr directly fromCRAN:

install.packages("TSrepr")

Or development version fromGitHub with:

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

Overview

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

Additional useful functions are implemented as:

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 timesdata_paa<-repr_paa(data_ts,q=12,func=mean)data_pla<-repr_pla(data_ts,times=55,return="both")# returns both extracted places and valuesdata_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()

plot of chunk paa_vs_pla

For more information

Contact

For any suggestions and comments write me an email at:tsreprpackage@gmail.com

Citation

Cite the package as:

Share this:

TwitterFacebookGoogle+LinkedInPinterestreddit