Introduction to Rcatch22

library(Rcatch22)

Rcatch22 is an R package for the calculation of 22 CAnonical Time-series CHaracteristics (catch). The package is an efficient implementation that calculates time-series features coded in C.

Core calculation function

The main function of the package is catch22_all which automates the computation of the 22 features. This can be run in a one-liner:

data <- rnorm(100)
outs <- catch22_all(data)

Taking a look at the returned dataframe, we can see a nice tidy data structure:

outs
##                                          names       values
## 1                           DN_HistogramMode_5  0.021164714
## 2                          DN_HistogramMode_10 -0.237244526
## 3                                    CO_f1ecac  1.662018757
## 4                               CO_FirstMin_ac  1.000000000
## 5                     CO_HistogramAMI_even_2_5  0.099590215
## 6                                CO_trev_1_num  0.133225730
## 7                         MD_hrv_classic_pnn40  1.000000000
## 8             SB_BinaryStats_mean_longstretch1  7.000000000
## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.004285277
## 10                   PD_PeriodicityWang_th0_01  6.000000000
## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.054885173
## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  3.000000000
## 13              FC_LocalSimple_mean1_tauresrat  0.333333333
## 14               DN_OutlierInclude_p_001_mdrmd -0.220000000
## 15               DN_OutlierInclude_n_001_mdrmd  0.240000000
## 16            SP_Summaries_welch_rect_area_5_1  0.173249565
## 17            SB_BinaryStats_diff_longstretch0  5.000000000
## 18                   SB_MotifThree_quantile_hh  2.179967394
## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.828571429
## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.742857143
## 21            SP_Summaries_welch_rect_centroid  1.374446786
## 22                 FC_LocalSimple_mean3_stderr  1.201867290

catch24

An option to include the mean and standard deviation as features in addition to catch22 is available through setting the catch24 argument to TRUE:

outs2 <- catch22_all(data, catch24 = TRUE)
outs2
##                                          names       values
## 1                           DN_HistogramMode_5  0.021164714
## 2                          DN_HistogramMode_10 -0.237244526
## 3                                    CO_f1ecac  1.662018757
## 4                               CO_FirstMin_ac  1.000000000
## 5                     CO_HistogramAMI_even_2_5  0.099590215
## 6                                CO_trev_1_num  0.133225730
## 7                         MD_hrv_classic_pnn40  1.000000000
## 8             SB_BinaryStats_mean_longstretch1  7.000000000
## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.004285277
## 10                   PD_PeriodicityWang_th0_01  6.000000000
## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.054885173
## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  3.000000000
## 13              FC_LocalSimple_mean1_tauresrat  0.333333333
## 14               DN_OutlierInclude_p_001_mdrmd -0.220000000
## 15               DN_OutlierInclude_n_001_mdrmd  0.240000000
## 16            SP_Summaries_welch_rect_area_5_1  0.173249565
## 17            SB_BinaryStats_diff_longstretch0  5.000000000
## 18                   SB_MotifThree_quantile_hh  2.179967394
## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.828571429
## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.742857143
## 21            SP_Summaries_welch_rect_centroid  1.374446786
## 22                 FC_LocalSimple_mean3_stderr  1.201867290
## 23                                     DN_Mean  0.022461103
## 24                               DN_Spread_Std  0.941460809

Feature list

A list of the time-series features included in Rcatch22 can be viewed using the included feature_list vector:

Rcatch22::feature_list
##  [1] "DN_HistogramMode_5"                         
##  [2] "DN_HistogramMode_10"                        
##  [3] "CO_f1ecac"                                  
##  [4] "CO_FirstMin_ac"                             
##  [5] "CO_HistogramAMI_even_2_5"                   
##  [6] "CO_trev_1_num"                              
##  [7] "MD_hrv_classic_pnn40"                       
##  [8] "SB_BinaryStats_mean_longstretch1"           
##  [9] "SB_TransitionMatrix_3ac_sumdiagcov"         
## [10] "PD_PeriodicityWang_th0_01"                  
## [11] "CO_Embed2_Dist_tau_d_expfit_meandiff"       
## [12] "IN_AutoMutualInfoStats_40_gaussian_fmmi"    
## [13] "FC_LocalSimple_mean1_tauresrat"             
## [14] "DN_OutlierInclude_p_001_mdrmd"              
## [15] "DN_OutlierInclude_n_001_mdrmd"              
## [16] "SP_Summaries_welch_rect_area_5_1"           
## [17] "SB_BinaryStats_diff_longstretch0"           
## [18] "SB_MotifThree_quantile_hh"                  
## [19] "SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1"
## [20] "SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1"     
## [21] "SP_Summaries_welch_rect_centroid"           
## [22] "FC_LocalSimple_mean3_stderr"