catch22: CAnonical Time-series CHaracteristics
catch22 GitHub
  • Welcome to catch22
    • Citing catch22
    • Publications using catch22
  • LANGUAGE-SPECIFIC DOCS
    • Python
    • MATLAB
    • R
    • Julia
    • C-compiled
  • INFORMATION ABOUT CATCH22
    • Feature Descriptions
      • Feature Overview Table
      • Distribution shape
      • Extreme event timing
      • Linear autocorrelation structure
      • Nonlinear autocorrelation
      • Symbolic
      • Incremental differences
      • Simple forecasting
      • Self-affine scaling
      • Other
    • API Reference
      • Python API
      • Julia API
      • R API
      • MATLAB API
    • Contributing to catch22
      • Contributor Code of Conduct
    • Related Packages
    • License
Powered by GitBook
On this page
  • R Usage Guide
  • Installation
  • Getting Started: Basic Usage
  • Expected Input
  • Computing catch22 features
  • Expected output
  • Advanced Usage
  • 1. Catch24
  • 2. Computing Individual Features
  • FAQ
  1. LANGUAGE-SPECIFIC DOCS

R

A detailed usage guide for installing and using catch22 in R (Rcatch22).

PreviousMATLABNextJulia

Last updated 1 year ago

R Usage Guide

Select a card below to access R-specific usage information.



Installation


You can install the stable version of Rcatch22 from using the following:

install.packages("Rcatch22")

Getting Started: Basic Usage

Here we outline how you can jump straight into computing catch22 features on your time series data with a basic usage example.

Expected Input

Rcatch22 expects a single univariate time series as a numeric vector with length equal to the number of points in the time series. For example, consider a time series with length 100:

library(Rcatch22)
data <- stats::rnorm(100) # your time series data

Computing catch22 features

To compute catch22 features, call the catch22_all function on your time series data as follows:

outs22 <- catch22_all(data)

Expected output

A data frame is returned with two columns: names and features as shown below

outs22
##                                          names       values
## 1                           DN_HistogramMode_5  0.432653377
## 2                          DN_HistogramMode_10  0.174395817
## 3                                    CO_f1ecac  1.865299453
...                                ...                 ...
## 21            SP_Summaries_welch_rect_centroid  1.178097245
## 22                 FC_LocalSimple_mean3_stderr  1.201213638

To access the full list of feature names, you can also run feature_list.

And that's it! You now have all the knowledge you need to apply catch22 to your time series data. To access some of the additional functionality of catch22, keep reading for advanced usage tips and examples.



Advanced Usage

Ready to explore some of the additional functionality of Rcatch22?

1. Catch24

If the location and spread of the raw time series distribution may be important for your application, you can enable catch24.

Catch24 is an extension of the original catch22 feature set to include mean and standard deviation, yielding a total of 24 time series features. An option to include the mean and standard deviation as features in addition to catch22 is available through setting the catch24 argument to TRUE:

library(Rcatch22)

x <- 1 + 0.5 * 1:1000 + arima.sim(list(ma = 0.5), n = 1000)
features <- catch22_all(x, catch24 = TRUE)

2. Computing Individual Features

If you do not wish to compute the full catch22 feature set on your time series, you can alternatively compute each feature (including mean and std. deviation) individually.

For example, let's compute the feature IN_AutoMutualInfoStats_40_gaussian_fmmi on a single univariate time series:

library(Rcatch22)
x <- 1 + 0.5 * 1:1000 + arima.sim(list(ma = 0.5), n = 1000)
f <- IN_AutoMutualInfoStats_40_gaussian_fmmi(x)

FAQ


Click one of the expandable tabs below to explore commonly asked questions about Rcatch22:

How does computational time scale as a function of time series length in Rcatch22?
How can I submit a bug report for Rcatch22?

In pycatch22 each feature function can be accessed individually and takes arrays as tuples or To compute individual features in Rcatch22, you can access the feature functions using their unique names (as shown in the ). Note that feature functions are given by the feature long name e.g.,IN_AutoMutualInfoStats_40_gaussian_fmmi.

With features coded in C, Rcatch22 is highly computationally efficient, scaling nearly linearly with time series size. Computation time in seconds for a range of time series lengths is presented .

If you would like to submit a bug report, you can access our Bug Tracker . For guidelines on submitting an ideal bug report, see our page on .

feature overview table
here
here
contributing to catch22
CRAN
Page cover image
Cover

Installation

Cover

Getting started

Cover

Advanced usage

Cover

Frequently Asked Questions

Cover

API Reference