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.184364519
## 2                          DN_HistogramMode_10  0.074294298
## 3                                    CO_f1ecac  1.564514063
## 4                               CO_FirstMin_ac  1.000000000
## 5                     CO_HistogramAMI_even_2_5  0.072377182
## 6                                CO_trev_1_num  0.098650309
## 7                         MD_hrv_classic_pnn40  0.979797980
## 8             SB_BinaryStats_mean_longstretch1  8.000000000
## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.001224365
## 10                   PD_PeriodicityWang_th0_01  3.000000000
## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.040845948
## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  2.000000000
## 13              FC_LocalSimple_mean1_tauresrat  1.000000000
## 14               DN_OutlierInclude_p_001_mdrmd  0.380000000
## 15               DN_OutlierInclude_n_001_mdrmd -0.200000000
## 16            SP_Summaries_welch_rect_area_5_1  0.148706200
## 17            SB_BinaryStats_diff_longstretch0  4.000000000
## 18                   SB_MotifThree_quantile_hh  2.185861836
## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.800000000
## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.828571429
## 21            SP_Summaries_welch_rect_centroid  1.767145868
## 22                 FC_LocalSimple_mean3_stderr  1.168300958

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.184364519
## 2                          DN_HistogramMode_10  0.074294298
## 3                                    CO_f1ecac  1.564514063
## 4                               CO_FirstMin_ac  1.000000000
## 5                     CO_HistogramAMI_even_2_5  0.072377182
## 6                                CO_trev_1_num  0.098650309
## 7                         MD_hrv_classic_pnn40  0.979797980
## 8             SB_BinaryStats_mean_longstretch1  8.000000000
## 9           SB_TransitionMatrix_3ac_sumdiagcov  0.001224365
## 10                   PD_PeriodicityWang_th0_01  3.000000000
## 11        CO_Embed2_Dist_tau_d_expfit_meandiff  0.040845948
## 12     IN_AutoMutualInfoStats_40_gaussian_fmmi  2.000000000
## 13              FC_LocalSimple_mean1_tauresrat  1.000000000
## 14               DN_OutlierInclude_p_001_mdrmd  0.380000000
## 15               DN_OutlierInclude_n_001_mdrmd -0.200000000
## 16            SP_Summaries_welch_rect_area_5_1  0.148706200
## 17            SB_BinaryStats_diff_longstretch0  4.000000000
## 18                   SB_MotifThree_quantile_hh  2.185861836
## 19 SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1  0.800000000
## 20      SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1  0.828571429
## 21            SP_Summaries_welch_rect_centroid  1.767145868
## 22                 FC_LocalSimple_mean3_stderr  1.168300958
## 23                                     DN_Mean  0.006509419
## 24                               DN_Spread_Std  1.030723731

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"