
Compute features on an input time series dataset
Source:R/calculate_features.R
calculate_features.RdCompute features on an input time series dataset
Usage
calculate_features(
data,
feature_set = c("catch22", "feasts", "tsfeatures", "kats", "tsfresh", "tsfel", "hctsa",
"quantiles", "moments", "fftquantiles", "fft"),
features = NULL,
catch24 = FALSE,
tsfresh_cleanup = FALSE,
use_compengine = FALSE,
seed = 123,
z_score = FALSE,
squared,
n_jobs = 0,
warn = TRUE,
fft_phase = FALSE
)Arguments
- data
tbl_tscontaining the time series data- feature_set
characterorvectorofcharacterdenoting the set of time-series features to calculate. Can be one of"catch22","feasts","tsfeatures","tsfresh","tsfel","kats","hctsa","quantiles","moments","fftquantiles", and or"fft"- features
named
listcontaining a set of user-supplied functions to calculate ondata. Each function should take a single argument which is the time series. Defaults toNULLfor no manually-specified features. Each list entry must have a name ascalculate_featureslooks for these to name the features. If you don't want to use the existing feature sets and only compute those passed tofeatures, setfeature_set = NULL- catch24
Booleanspecifying whether to computecatch24in addition tocatch22ifcatch22is one of the feature sets selected. Defaults toFALSE- tsfresh_cleanup
Booleanspecifying whether to use the in-builttsfreshrelevant feature filter or not. Defaults toFALSE. The filter is supervised, so it requires a class label as the second key variable ofdata. As it uses the class labels of every time series, evaluating the selected features with a classifier on the same data (e.g., withtheftdlc::classify) gives optimistically biased results- use_compengine
Booleanspecifying whether to use the"compengine"features intsfeatures. Defaults toFALSEto provide immense computational efficiency benefits- seed
integerdenoting a fixed number for R's random number generator to ensure reproducibility. Defaults to123. The caller's random number generator state is restored on exit- z_score
Booleanspecifying whether to z-score the time-series before computing features. Defaults toFALSE- squared
Deprecated and ignored. The
"fft"and"fftquantiles"feature sets are now relative spectral power in fixed frequency bands (seefft_features), so there is no magnitude/squared-magnitude choice- n_jobs
integerdenoting the number of parallel processes to use. Defaults to0for no parallelisation- warn
Booleanspecifying whether to produce warnings from feature set packages. Defaults toTRUE- fft_phase
Booleanspecifying whether the"fft"and"fftquantiles"feature sets also include each frequency band's phase, as its cosine and sine (seefft_features). Only meaningful when the series share a time origin, e.g., event-locked trials. Defaults toFALSE