classify_ts: Classifies a time series based on the defined ts taxonomy...

Description Usage Arguments Value Examples

Description

This is a function to calculate the different (statistical) features from the defined time series taxonomy. The taxonomy can be applied to classify univariate and multivariate time series based on it. As input for ts is only required an object from the classes time series, data.frame or vector. Each of them should represent an time series. Otherwise the function returns an error message. Also, for na_option is only required the string 'mean' or'kalman' allowed. This means, that all na values are either replaced by the mean, or kalman imputation of the ts. The standard value of na_option is 'mean'. The paramter taxonomy_type defines whether the overall 24 features or a ligther version of 15 features based on feature selection is applied. 'v1' the basic taxonomy contains the following features:"number_of_observations", "coefficient of determination", "durbin watson test", "mean", "periodicity", "chaos", "entropy", "selfsimilarity", "dynamic time warping (DTW) distance ", "percentage of turning points", "variance", "percentage of outliers", "percentage of step changes", "quartile distribition", "standard deviation", "percentage of peaks", "trend", "seasonality", "autocorrelation", "partial autocorrelation", "skewness", "kurtosis", "non linearity" "number_of_attributes". The ligther version 'v2' contains the following 15 features: "coefficient of determination", "durbin watson test", "periodicity", "chaos", "entropy", "percentage of turning points", "percentage of outliers", "percentage of step changes", "quartile distribition", "percentage of peaks", "trend", "seasonality", "autocorrelation", "partial autocorrelation", "number_of_attributes".

Usage

1
classify_ts(ts, na_option = "mean", taxonomy_type = "v1")

Arguments

ts

Either a vector, time series or data.frame object representing a time series is allowed.

na_option

A string value containing either 'mean' or'kalman'; Standard values is 'mean'.

taxonomy_type

Either 'v1' or 'v2'. v1 uses the basic time series taxonomy containing the overall 24 features and v2 the feature selected ts taxonomy containing 15 features. Standard values is 'v1'.

Value

The final list, containing all scaled feature factor values. If the input ts is not a vector, ts or data.frame object an error message is returned.

Examples

1
2
3
4
5
6
ts_vector = c(1,4,6,1,24,5,1)
df = multi_ts_list$`M-TS-1`$data
ts = datasets::BJsales
classify_ts(ts = ts_vector_object)
classify_ts(ts = df, na_option = "kalman")
classify_ts(ts = ts, na_option = "mean")

mowomoyela/tstaxonomyr documentation built on May 15, 2019, 4:47 p.m.