Learn R Programming

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 × 20
#>   frequency nperiods seasonal_period trend      spike linearity curvature e_acf1
#>       <dbl>    <dbl>           <dbl> <dbl>      <dbl>     <dbl>     <dbl>  <dbl>
#> 1         1        0               1 0.125    2.10e-5      3.58      1.11  0.793
#> 2         1        0               1 0.985    3.01e-8      4.45      1.10  0.774
#> 3        12        1              12 0.991    1.46e-8     11.0       1.09  0.509
#> 4        12        1              12 0.802    9.15e-7     -2.12      2.85  0.258
#> # ℹ 12 more variables: 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

16,462

Version

1.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rob Hyndman

Last Published

August 28th, 2023

Functions in tsfeatures (1.1.1)

firstzero_ac

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

Implements fluctuation analysis from software package hctsa
entropy

Spectral entropy of a time series
outlierinclude_mdrmd

How median depend on distributional outliers from software package hctsa
stl_features

Strength of trend and seasonality of a time series
flat_spots

Longest flat spot
pacf_features

Partial autocorrelation-based features
std1st_der

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

Heterogeneity coefficients
dist_features

The distribution feature set from software package hctsa
firstmin_ac

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

Hurst coefficient
embed2_incircle

Points inside a given circular boundary in a 2-d embedding space 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
pred_features

The prediction 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
histogram_mode

Mode of a data vector from software package hctsa
holt_parameters

Parameter estimates of Holt's linear trend method
tsfeatures-package

tsfeatures: Time Series Feature Extraction
nonlinearity

Nonlinearity coefficient
motiftwo_entro3

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

Time series features based on tiled windows
max_level_shift

Time series features based on sliding windows
tsfeatures

Time series feature matrix
sampenc

Second Sample Entropy from software package hctsa
scal_features

The scaling feature set from software package hctsa
sampen_first

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

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

The stationarity feature set from software package hctsa
zero_proportion

Proportion of zeros
spreadrandomlocal_meantaul

Bootstrap-based stationarity measure from software package hctsa
yahoo_data

Yahoo server metrics
unitroot_kpss

Unit Root Test Statistics
as.list.mts

Convert mts object to list of time series
crossing_points

Number of crossing points
ac_9

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

The autocorrelation feature set from software package hctsa
acf_features

Autocorrelation-based features
compengine

CompEngine feature set
arch_stat

ARCH LM Statistic
binarize_mean

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