Skip to content

mowomoyela/tstaxonomyr

Repository files navigation

tstaxonomyr

A time series taxonomy to classify univariate or multivariate time series based on either 24 or 15 different (statistical) time series features. The different taxonomy versions can be selected by the taxonomy_type parameter from the function 'classify_ts' of this package. It generates and collects all feature values. Next the feature values are scaled to [0,1] and then assigned to the defined taxonomy factors. Additionally, each feature can be calculated for it's own.

Usage

# Initialize the R package
library(tstaxonomyr)

# Example of the TS taxonomy classification --------
# Use the univariate time series object 'BJsales'
ts_sales = datasets::BJsales
# Classify the time series based on the defined taxonomy 
# in 'classify_ts'
classified_ts <- classify_ts(ts = ts_sales,
                             na_option = "mean", taxonomy_type = "v1")
# Get the classification factor results
classified_ts

# Example of a single feature value calculation --------
# Calculate the skewness of a time series object
skewness = calculate_skewness(ts = ts_sales)
# Get the resulting skewness factor
skewness

Installation

You can install the development version 1.0.0 from Github with:

devtools::install_github("mowomoyela/tstaxonomyr")

Overview

All provided functions of this package:

  • Version 1.0.0
    • classify_ts: Classifies a time series based on the defined ts taxonomy features.
    • calculate_skewness: Generates the skewness of an ts object.
    • calculate_kurtosis: Generates the kurtosis of an ts object.
    • calculate_trend: Generates the trend of an ts object.
    • calculate_autocorrelation: Generates the mean of the autocorrelationfunction (ACF) of an ts object.
    • calculate_mean: Generates the mean of the normalized values [0,1] of an ts object.
    • calculate_sd: Generates the standard deviation of an ts object.
    • calculate_observationnumber: Generates the number of observations of an ts object.
    • calculate_non_linearity: Generates the non linearity factor of an ts object.
    • calculate_seasonality: Generates the seasonality factor of an ts object.
    • calculate_periodicity: Generates the periodicity/frequency factor of an ts object.
    • calculate_chaos: Generates the maximum Lyapunov exponent (chaos) of an ts object.
    • calculate_entropy: Generates the approximate entropy of an ts object.
    • calculate_selfsimilarity: Generates the Hurst exponent of an ts object.
    • calculate_dtw_blockdistance: Generates the dynamic time warping (DTW) for an ts object to the 1000 ts from the list in /data.
    • calculate_turningpoint_percentage: Generates the percentage of turning points of an ts object.
    • calculate_partial_autocorrelation: Generates the mean of the partial autocorrelationfunction (PACF) of an ts object.
    • calculate_variance: Generates the variance of an ts object.
    • calculate_outlier_percentage: Generates the percentage of outliers of an ts object.
    • calculate_stepchange_percentage: Generates the percentage of step changes of an ts object.
    • calculate_peak_percentage: Generates the percentage of peaks of an ts object.
    • calculate_durbin_watson_test: Generates the autocorrelation measure of an data.frame object.
    • calculate_quartile_distribution: Generates the percentage of the values in the 4 quartiles of an ts object.
    • calculate_determination_coefficient: Generates the coefficient of determination (R2) of an data.frame object.
    • calculate_attributenumber: Generates the number of attributes of an data.frame object.

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages