Learn R Programming

⚠️There's a newer version (1.1.1) of this package.Take me there.

tsfeatures

The R package tsfeatures provides methods for extracting various features from time series data.

Installation

You can install the stable version on R CRAN.

install.packages('tsfeatures', dependencies = TRUE)

You can install the development version from Github with:

# install.packages("devtools")
devtools::install_github("robjhyndman/tsfeatures")

Usage

library(tsfeatures)
mylist <- list(sunspot.year, WWWusage, AirPassengers, USAccDeaths)
myfeatures <- tsfeatures(mylist)
myfeatures
#> # A tibble: 4 x 20
#>   frequency nperiods seasonal_period trend   spike linearity curvature
#>       <dbl>    <dbl>           <dbl> <dbl>   <dbl>     <dbl>     <dbl>
#> 1         1        0               1 0.125 2.10e-5      3.58      1.11
#> 2         1        0               1 0.985 3.01e-8      4.45      1.10
#> 3        12        1              12 0.989 2.12e-8     11.0       1.10
#> 4        12        1              12 0.796 9.67e-7     -2.13      2.85
#> # ... with 13 more variables: e_acf1 <dbl>, e_acf10 <dbl>, entropy <dbl>,
#> #   x_acf1 <dbl>, x_acf10 <dbl>, diff1_acf1 <dbl>, diff1_acf10 <dbl>,
#> #   diff2_acf1 <dbl>, diff2_acf10 <dbl>, seasonal_strength <dbl>,
#> #   peak <dbl>, trough <dbl>, seas_acf1 <dbl>

License

This package is free and open source software, licensed under GPL-3.

Copy Link

Version

Install

install.packages('tsfeatures')

Monthly Downloads

13,097

Version

1.0.1

License

GPL-3

Maintainer

Rob Hyndman

Last Published

April 16th, 2019

Functions in tsfeatures (1.0.1)

hurst

Hurst coefficient
ac_9

Autocorrelation at lag 9. Included for completion and consistency.
compengine

CompEngine feature set
binarize_mean

Converts an input vector into a binarized version from software package hctsa
acf_features

Autocorrelation-based features
fluctanal_prop_r1

Implements fluctuation analysis from software package hctsa
entropy

Spectral entropy of a time series
max_level_shift

Time series features based on sliding windows
unitroot_kpss

Unit Root Test Statistics
firstmin_ac

Time of first minimum in the autocorrelation function from software package hctsa
crossing_points

Number of crossing points
dist_features

The distribution feature set from software package hctsa
embed2_incircle

Points inside a given circular boundary in a 2-d embedding space from software package hctsa
pred_features

The prediction feature set from software package hctsa
lumpiness

Time series features based on tiled windows
sampen_first

Second Sample Entropy of a time series from software package hctsa
firstzero_ac

The first zero crossing of the autocorrelation function from software package hctsa
yahoo_data

Yahoo server metrics
walker_propcross

Simulates a hypothetical walker moving through the time domain from software package hctsa
heterogeneity

Heterogeneity coefficients
sampenc

Second Sample Entropy from software package hctsa
flat_spots

Number of flat spots
histogram_mode

Mode of a data vector from software package hctsa
holt_parameters

Parameter estimates of Holt's linear trend method
motiftwo_entro3

Local motifs in a binary symbolization of the time series from software package hctsa
nonlinearity

Nonlinearity coefficient
outlierinclude_mdrmd

How median depend on distributional outliers from software package hctsa
pacf_features

Partial autocorrelation-based features
spreadrandomlocal_meantaul

Bootstrap-based stationarity measure from software package hctsa
scal_features

The scaling feature set from software package hctsa
station_features

The stationarity feature set from software package hctsa
trev_num

Normalized nonlinear autocorrelation, the numerator of the trev function of a time series from software package hctsa
arch_stat

ARCH LM Statistic
as.list.mts

Convert mts object to list of time series
tsfeatures

Time series feature matrix
std1st_der

Standard deviation of the first derivative of the time series from software package hctsa
stl_features

Strength of trend and seasonality of a time series
autocorr_features

The autocorrelation feature set from software package hctsa
localsimple_taures

The first zero crossing of the autocorrelation function of the residuals from Simple local time-series forecasting from software package hctsa