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.0603841849
## 2                          DN_HistogramMode_10 -0.1977360446
## 3                                    CO_f1ecac  1.5765511170
## 4                               CO_FirstMin_ac  2.0000000000
## 5                     CO_HistogramAMI_even_2_5  0.0670291814
## 6                                CO_trev_1_num  0.8933181032
## 7                         MD_hrv_classic_pnn40  1.0000000000
## 8             SB_BinaryStats_mean_longstretch1  6.0000000000
## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.0009862939
## 10                   PD_PeriodicityWang_th0_01  3.0000000000
## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.0720758626
## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  2.0000000000
## 13              FC_LocalSimple_mean1_tauresrat  1.0000000000
## 14               DN_OutlierInclude_p_001_mdrmd  0.1200000000
## 15               DN_OutlierInclude_n_001_mdrmd  0.2200000000
## 16            SP_Summaries_welch_rect_area_5_1  0.1260290016
## 17            SB_BinaryStats_diff_longstretch0  4.0000000000
## 18                   SB_MotifThree_quantile_hh  2.1878292196
## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.7428571429
## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.7428571429
## 21            SP_Summaries_welch_rect_centroid  1.5707963268
## 22                 FC_LocalSimple_mean3_stderr  1.1977189052

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.0603841849
## 2                          DN_HistogramMode_10 -0.1977360446
## 3                                    CO_f1ecac  1.5765511170
## 4                               CO_FirstMin_ac  2.0000000000
## 5                     CO_HistogramAMI_even_2_5  0.0670291814
## 6                                CO_trev_1_num  0.8933181032
## 7                         MD_hrv_classic_pnn40  1.0000000000
## 8             SB_BinaryStats_mean_longstretch1  6.0000000000
## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.0009862939
## 10                   PD_PeriodicityWang_th0_01  3.0000000000
## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.0720758626
## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  2.0000000000
## 13              FC_LocalSimple_mean1_tauresrat  1.0000000000
## 14               DN_OutlierInclude_p_001_mdrmd  0.1200000000
## 15               DN_OutlierInclude_n_001_mdrmd  0.2200000000
## 16            SP_Summaries_welch_rect_area_5_1  0.1260290016
## 17            SB_BinaryStats_diff_longstretch0  4.0000000000
## 18                   SB_MotifThree_quantile_hh  2.1878292196
## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.7428571429
## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.7428571429
## 21            SP_Summaries_welch_rect_centroid  1.5707963268
## 22                 FC_LocalSimple_mean3_stderr  1.1977189052
## 23                                     DN_Mean  0.0253627299
## 24                               DN_Spread_Std  1.0373941318

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"