From cee967ba14bfaf131364e11604c40fb2808239f4 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 27 Sep 2021 18:39:36 +1000 Subject: [PATCH 01/18] Started catch24 --- C/DN_Mean.c | 11 +++++++++++ C/DN_Mean.h | 12 ++++++++++++ C/DN_Spread_Std.c | 13 +++++++++++++ C/DN_Spread_Std.h | 12 ++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 C/DN_Mean.c create mode 100644 C/DN_Mean.h create mode 100644 C/DN_Spread_Std.c create mode 100644 C/DN_Spread_Std.h diff --git a/C/DN_Mean.c b/C/DN_Mean.c new file mode 100644 index 00000000..f2e75eaf --- /dev/null +++ b/C/DN_Mean.c @@ -0,0 +1,11 @@ +#include + +double DN_Mean(const double a[], const int size) +{ + double m = 0.0; + for (int i = 0; i < size; i++) { + m += a[i]; + } + m /= size; + return m; +} diff --git a/C/DN_Mean.h b/C/DN_Mean.h new file mode 100644 index 00000000..a39d1351 --- /dev/null +++ b/C/DN_Mean.h @@ -0,0 +1,12 @@ +// +// Created by Trent Henderson 27 September 2021 +// + +#ifndef DN_MEAN +#define DN_MEAN + +#include + +extern double DN_Mean(const double a[], const int size); + +#endif /* DN_MEAN */ \ No newline at end of file diff --git a/C/DN_Spread_Std.c b/C/DN_Spread_Std.c new file mode 100644 index 00000000..413580c6 --- /dev/null +++ b/C/DN_Spread_Std.c @@ -0,0 +1,13 @@ +#include +#include "stats.h" + +double stddev(const double a[], const int size) +{ + double m = mean(a, size); + double sd = 0.0; + for (int i = 0; i < size; i++) { + sd += pow(a[i] - m, 2); + } + sd = sqrt(sd / (size - 1)); + return sd; +} \ No newline at end of file diff --git a/C/DN_Spread_Std.h b/C/DN_Spread_Std.h new file mode 100644 index 00000000..c150e143 --- /dev/null +++ b/C/DN_Spread_Std.h @@ -0,0 +1,12 @@ +// +// Created by Trent Henderson 27 September 2021 +// + +#ifndef DN_SPREADSTD +#define DN_SPREADSTD + +#include + +extern double DN_Spread_Std(const double a[], const int size); + +#endif /* DN_SPREADSTD */ \ No newline at end of file From c278490b9ca3d9eb8fae4d758553904e957714f0 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 27 Sep 2021 18:53:00 +1000 Subject: [PATCH 02/18] Changes to main --- C/main.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/C/main.c b/C/main.c index 7b71de91..71cf3728 100644 --- a/C/main.c +++ b/C/main.c @@ -6,6 +6,8 @@ #include "DN_HistogramMode_5.h" #include "DN_HistogramMode_10.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "CO_AutoCorr.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" @@ -196,6 +198,18 @@ void run_features(double y[], int size, FILE * outfile) result = PD_PeriodicityWang_th0_01(y_zscored, size); timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; fprintf(outfile, "%.14f, %s, %f\n", result, "PD_PeriodicityWang_th0_01", timeTaken); + + // GOOD + begin = clock(); + result = DN_Mean(y_zscored, size); + timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; + fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Mean", timeTaken); + + // GOOD + begin = clock(); + result = DN_Spread_Std(y_zscored, size); + timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; + fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Spread_Std", timeTaken); fprintf(outfile, "\n"); @@ -351,7 +365,11 @@ int main2(int argc, char * argv[]) printf("SB_TransitionMatrix_3ac_sumdiagcov: %1.5f\n", result); result = PD_PeriodicityWang_th0_01(y, size); printf("PD_PeriodicityWang_th0_01: %1.f\n", result); - + + result = DN_Mean(y, size); + printf("DN_Mean: %1.f\n", result); + result = DN_Spread_Std(y, size); + printf("DN_Spread_Std: %1.f\n", result); return 0; } From 2d4eaa8ec4cc722cc3dbb376fd1c4e78f0f657a6 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 27 Sep 2021 19:36:13 +1000 Subject: [PATCH 03/18] More fixes for stddev --- C/DN_Spread_Std.c | 4 +- wrap_Python/catch22/catch22.py | 8 ++- wrap_R/catch22/R/catch22_all.R | 77 ++++++++++++++++------------- wrap_R/catch22/src/catch22_wrap.cpp | 21 ++++---- 4 files changed, 62 insertions(+), 48 deletions(-) diff --git a/C/DN_Spread_Std.c b/C/DN_Spread_Std.c index 413580c6..5f5f0351 100644 --- a/C/DN_Spread_Std.c +++ b/C/DN_Spread_Std.c @@ -1,7 +1,7 @@ #include #include "stats.h" -double stddev(const double a[], const int size) +double DN_Spread_Std(const double a[], const int size) { double m = mean(a, size); double sd = 0.0; @@ -10,4 +10,4 @@ double stddev(const double a[], const int size) } sd = sqrt(sd / (size - 1)); return sd; -} \ No newline at end of file +} diff --git a/wrap_Python/catch22/catch22.py b/wrap_Python/catch22/catch22.py index 205f6c16..0efaa87e 100644 --- a/wrap_Python/catch22/catch22.py +++ b/wrap_Python/catch22/catch22.py @@ -1,6 +1,6 @@ import catch22_C -def catch22_all(data): +def catch22_all(data, catch24 = False): features = [ 'DN_HistogramMode_5', @@ -25,7 +25,11 @@ def catch22_all(data): 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', 'SP_Summaries_welch_rect_centroid', 'FC_LocalSimple_mean3_stderr' - ] + ] + + if catch24 == True: + features24 = ["DN_Mean", "DN_Spread_Std"] + features = features.append(features24) data = list(data) diff --git a/wrap_R/catch22/R/catch22_all.R b/wrap_R/catch22/R/catch22_all.R index 9c6890a6..7ed44623 100644 --- a/wrap_R/catch22/R/catch22_all.R +++ b/wrap_R/catch22/R/catch22_all.R @@ -1,37 +1,44 @@ -catch22_all <- function(data){ - -names <- c('DN_HistogramMode_5', - 'DN_HistogramMode_10', - 'CO_f1ecac', - 'CO_FirstMin_ac', - 'CO_HistogramAMI_even_2_5', - 'CO_trev_1_num', - 'MD_hrv_classic_pnn40', - 'SB_BinaryStats_mean_longstretch1', - 'SB_TransitionMatrix_3ac_sumdiagcov', - 'PD_PeriodicityWang_th0_01', - 'CO_Embed2_Dist_tau_d_expfit_meandiff', - 'IN_AutoMutualInfoStats_40_gaussian_fmmi', - 'FC_LocalSimple_mean1_tauresrat', - 'DN_OutlierInclude_p_001_mdrmd', - 'DN_OutlierInclude_n_001_mdrmd', - 'SP_Summaries_welch_rect_area_5_1', - 'SB_BinaryStats_diff_longstretch0', - 'SB_MotifThree_quantile_hh', - 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', - 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', - 'SP_Summaries_welch_rect_centroid', - 'FC_LocalSimple_mean3_stderr'); - -values = c(); - -for (feature in names){ - fh = get(feature); - values = append(values, fh(data)); -} - -outData = data.frame(names = names, values = values); - -return(outData) +catch22_all <- function(data, catch24 = FALSE){ + names <- c('DN_HistogramMode_5', + 'DN_HistogramMode_10', + 'CO_f1ecac', + 'CO_FirstMin_ac', + 'CO_HistogramAMI_even_2_5', + 'CO_trev_1_num', + 'MD_hrv_classic_pnn40', + 'SB_BinaryStats_mean_longstretch1', + 'SB_TransitionMatrix_3ac_sumdiagcov', + 'PD_PeriodicityWang_th0_01', + 'CO_Embed2_Dist_tau_d_expfit_meandiff', + 'IN_AutoMutualInfoStats_40_gaussian_fmmi', + 'FC_LocalSimple_mean1_tauresrat', + 'DN_OutlierInclude_p_001_mdrmd', + 'DN_OutlierInclude_n_001_mdrmd', + 'SP_Summaries_welch_rect_area_5_1', + 'SB_BinaryStats_diff_longstretch0', + 'SB_MotifThree_quantile_hh', + 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', + 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', + 'SP_Summaries_welch_rect_centroid', + 'FC_LocalSimple_mean3_stderr') + + if(catch24){ + + names24 <- c("DN_Mean", "DN_Spread_Std") + names <- append(names, names24) + + } else{ + } + + values = c(); + + for (feature in names){ + fh = get(feature); + values = append(values, fh(data)); + } + + outData = data.frame(names = names, values = values); + + return(outData) } \ No newline at end of file diff --git a/wrap_R/catch22/src/catch22_wrap.cpp b/wrap_R/catch22/src/catch22_wrap.cpp index cf2aa074..fcc77637 100644 --- a/wrap_R/catch22/src/catch22_wrap.cpp +++ b/wrap_R/catch22/src/catch22_wrap.cpp @@ -22,6 +22,8 @@ extern "C" { #include "histcounts.h" #include "splinefit.h" #include "stats.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" } using namespace Rcpp; @@ -254,13 +256,14 @@ NumericVector FC_LocalSimple_mean3_stderr(NumericVector x) return R_wrapper_double(x, &FC_LocalSimple_mean3_stderr, 1); } +// [[Rcpp::export]] +NumericVector DN_Mean(NumericVector x) +{ + return R_wrapper_double(x, &DN_Mean, 1); +} -// You can include R code blocks in C++ files processed with sourceCpp -// (useful for testing and development). The R code will be automatically -// run after the compilation. -// - - -/*** R -arraysum(c(42, 21)); -*/ +// [[Rcpp::export]] +NumericVector DN_Spread_Std(NumericVector x) +{ + return R_wrapper_double(x, &DN_Spread_Std, 1); +} From 94eeb9493e8cbc18e16c46c374adbc64c1817779 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 27 Sep 2021 20:15:22 +1000 Subject: [PATCH 04/18] More fixes --- C/main.c | 37 +++++++++++++++-------------- C/main.h | 3 ++- wrap_R/catch22/src/catch22_wrap.cpp | 26 ++------------------ wrap_R/testing.R | 14 ++++++----- 4 files changed, 31 insertions(+), 49 deletions(-) diff --git a/C/main.c b/C/main.c index 71cf3728..2c46f4b7 100644 --- a/C/main.c +++ b/C/main.c @@ -2,6 +2,7 @@ #include "main.h" #include #include +#include //#include #include "DN_HistogramMode_5.h" @@ -46,7 +47,7 @@ int quality_check(const double y[], const int size) return 0; } -void run_features(double y[], int size, FILE * outfile) +void run_features(double y[], int size, FILE * outfile, bool catch24) { int quality = quality_check(y, size); if(quality != 0) @@ -199,17 +200,22 @@ void run_features(double y[], int size, FILE * outfile) timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; fprintf(outfile, "%.14f, %s, %f\n", result, "PD_PeriodicityWang_th0_01", timeTaken); - // GOOD - begin = clock(); - result = DN_Mean(y_zscored, size); - timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; - fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Mean", timeTaken); + if (catch24) { + + // GOOD + begin = clock(); + result = DN_Mean(y_zscored, size); + timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; + fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Mean", timeTaken); - // GOOD - begin = clock(); - result = DN_Spread_Std(y_zscored, size); - timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; - fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Spread_Std", timeTaken); + // GOOD + begin = clock(); + result = DN_Spread_Std(y_zscored, size); + timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; + fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Spread_Std", timeTaken); + } else { + + } fprintf(outfile, "\n"); @@ -227,7 +233,7 @@ void print_help(char *argv[], char msg[]) exit(1); } -int main(int argc, char * argv[]) +int main(int argc, char * argv[], bool catch24) { FILE * infile, * outfile; int array_size; @@ -279,7 +285,7 @@ int main(int argc, char * argv[]) fclose(infile); y = realloc(y, size * sizeof *y); //printf("size=%i\n", size); - run_features(y, size, outfile); + run_features(y, size, outfile, catch24); fclose(outfile); free(y); @@ -365,11 +371,6 @@ int main2(int argc, char * argv[]) printf("SB_TransitionMatrix_3ac_sumdiagcov: %1.5f\n", result); result = PD_PeriodicityWang_th0_01(y, size); printf("PD_PeriodicityWang_th0_01: %1.f\n", result); - - result = DN_Mean(y, size); - printf("DN_Mean: %1.f\n", result); - result = DN_Spread_Std(y, size); - printf("DN_Spread_Std: %1.f\n", result); return 0; } diff --git a/C/main.h b/C/main.h index 7440f587..9c692468 100644 --- a/C/main.h +++ b/C/main.h @@ -6,10 +6,11 @@ #include #include #include +#include /* Function Declarations */ //extern int main(int argc, const char * const argv[]); -extern int main(int argc, char * argv[]); +extern int main(int argc, char * argv[], bool catch24); #endif diff --git a/wrap_R/catch22/src/catch22_wrap.cpp b/wrap_R/catch22/src/catch22_wrap.cpp index fcc77637..7978414b 100644 --- a/wrap_R/catch22/src/catch22_wrap.cpp +++ b/wrap_R/catch22/src/catch22_wrap.cpp @@ -5,6 +5,8 @@ extern "C" { #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" @@ -22,20 +24,10 @@ extern "C" { #include "histcounts.h" #include "splinefit.h" #include "stats.h" -#include "DN_Mean.h" -#include "DN_Spread_Std.h" } using namespace Rcpp; -// Learn more about Rcpp at: -// -// http://www.rcpp.org/ -// http://adv-r.had.co.nz/Rcpp.html -// http://gallery.rcpp.org/ -// - - // universal wrapper for a function that takes a double array and its length // and outputs a scalar double NumericVector R_wrapper_double(NumericVector x, double (*f) (const double*, const int), int normalize) { @@ -110,20 +102,6 @@ NumericVector R_wrapper_int(NumericVector x, int (*f) (const double*, const int) //----------------------- Feature functions ------------------------------- //------------------------------------------------------------------------- -/* -double CO_Embed2_Basic_tau_incircle_1_C(double * in, int n) -{ - return CO_Embed2_Basic_tau_incircle(in, n, 1, -1); -} -// [[Rcpp::export]] -NumericVector CO_Embed2_Basic_tau_incircle_1(NumericVector x) { - - return R_wrapper(x, &CO_Embed2_Basic_tau_incircle_1_C, 0); - -}; -*/ - - // [[Rcpp::export]] NumericVector DN_HistogramMode_5(NumericVector x) { diff --git a/wrap_R/testing.R b/wrap_R/testing.R index 1fd88d2d..c2662336 100644 --- a/wrap_R/testing.R +++ b/wrap_R/testing.R @@ -1,9 +1,11 @@ -library(catch22); -library(foreign); +library(catch22) +library(foreign) -data = read.table("../testData/test.txt"); -dataVec = c(t(data)); +data = read.table("../testData/test.txt") +dataVec = c(t(data)) -catch22_out = catch22_all(dataVec); +catch22_out = catch22_all(dataVec) +catch24_out = catch22_all(dataVec, TRUE) -print(catch22_out) \ No newline at end of file +print(catch22_out) +print(catch24_out) \ No newline at end of file From 1d62dc440528c081fdb31472477c1c85647a80cc Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 4 Oct 2021 10:59:50 +1100 Subject: [PATCH 05/18] Started Matlab wrapper integration --- wrap_Matlab/catch22_all.m | 86 +++++++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/wrap_Matlab/catch22_all.m b/wrap_Matlab/catch22_all.m index ab63a0fa..c0b0428c 100644 --- a/wrap_Matlab/catch22_all.m +++ b/wrap_Matlab/catch22_all.m @@ -1,30 +1,64 @@ -function [featureValues, featureNames] = catch22_all(data) +function [featureValues, featureNames] = catch22_all(data, catch24) -featureNames = ... - { ... - 'DN_HistogramMode_5', ... - 'DN_HistogramMode_10', ... - 'CO_f1ecac', ... - 'CO_FirstMin_ac', ... - 'CO_HistogramAMI_even_2_5', ... - 'CO_trev_1_num', ... - 'MD_hrv_classic_pnn40', ... - 'SB_BinaryStats_mean_longstretch1', ... - 'SB_TransitionMatrix_3ac_sumdiagcov', ... - 'PD_PeriodicityWang_th0_01', ... - 'CO_Embed2_Dist_tau_d_expfit_meandiff', ... - 'IN_AutoMutualInfoStats_40_gaussian_fmmi', ... - 'FC_LocalSimple_mean1_tauresrat', ... - 'DN_OutlierInclude_p_001_mdrmd', ... - 'DN_OutlierInclude_n_001_mdrmd', ... - 'SP_Summaries_welch_rect_area_5_1', ... - 'SB_BinaryStats_diff_longstretch0', ... - 'SB_MotifThree_quantile_hh', ... - 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', ... - 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', ... - 'SP_Summaries_welch_rect_centroid', ... - 'FC_LocalSimple_mean3_stderr' - }; + if nargin < 2 + catch24 = false; + end + + if catch24 + featureNames = ... + { ... + 'DN_HistogramMode_5', ... + 'DN_HistogramMode_10', ... + 'DN_Mean', ... + 'DN_Spread_Std', ... + 'CO_f1ecac', ... + 'CO_FirstMin_ac', ... + 'CO_HistogramAMI_even_2_5', ... + 'CO_trev_1_num', ... + 'MD_hrv_classic_pnn40', ... + 'SB_BinaryStats_mean_longstretch1', ... + 'SB_TransitionMatrix_3ac_sumdiagcov', ... + 'PD_PeriodicityWang_th0_01', ... + 'CO_Embed2_Dist_tau_d_expfit_meandiff', ... + 'IN_AutoMutualInfoStats_40_gaussian_fmmi', ... + 'FC_LocalSimple_mean1_tauresrat', ... + 'DN_OutlierInclude_p_001_mdrmd', ... + 'DN_OutlierInclude_n_001_mdrmd', ... + 'SP_Summaries_welch_rect_area_5_1', ... + 'SB_BinaryStats_diff_longstretch0', ... + 'SB_MotifThree_quantile_hh', ... + 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', ... + 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', ... + 'SP_Summaries_welch_rect_centroid', ... + 'FC_LocalSimple_mean3_stderr' + }; + else + featureNames = ... + { ... + 'DN_HistogramMode_5', ... + 'DN_HistogramMode_10', ... + 'CO_f1ecac', ... + 'CO_FirstMin_ac', ... + 'CO_HistogramAMI_even_2_5', ... + 'CO_trev_1_num', ... + 'MD_hrv_classic_pnn40', ... + 'SB_BinaryStats_mean_longstretch1', ... + 'SB_TransitionMatrix_3ac_sumdiagcov', ... + 'PD_PeriodicityWang_th0_01', ... + 'CO_Embed2_Dist_tau_d_expfit_meandiff', ... + 'IN_AutoMutualInfoStats_40_gaussian_fmmi', ... + 'FC_LocalSimple_mean1_tauresrat', ... + 'DN_OutlierInclude_p_001_mdrmd', ... + 'DN_OutlierInclude_n_001_mdrmd', ... + 'SP_Summaries_welch_rect_area_5_1', ... + 'SB_BinaryStats_diff_longstretch0', ... + 'SB_MotifThree_quantile_hh', ... + 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', ... + 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', ... + 'SP_Summaries_welch_rect_centroid', ... + 'FC_LocalSimple_mean3_stderr' + }; + end featureValues = zeros(length(featureNames),1); for featureInd = 1:length(featureNames) From 8e94f8026ade4652eebff65b06b22bec9d5eea46 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 4 Oct 2021 11:06:45 +1100 Subject: [PATCH 06/18] Matlab wrapper for catch24 --- .DS_Store | Bin 0 -> 8196 bytes Matlab/DN_Mean.m | 6 +++ Matlab/DN_Spread_Std.m | 6 +++ ...h22_CO_Embed2_Dist_tau_d_expfit_meandiff.c | 2 + wrap_Matlab/catch22_DN_HistogramMode_5.c | 2 + wrap_Matlab/catch22_DN_Mean.c | 43 ++++++++++++++++++ wrap_Matlab/catch22_DN_Spread_Std.c | 43 ++++++++++++++++++ 7 files changed, 102 insertions(+) create mode 100644 .DS_Store create mode 100644 Matlab/DN_Mean.m create mode 100644 Matlab/DN_Spread_Std.m create mode 100644 wrap_Matlab/catch22_DN_Mean.c create mode 100644 wrap_Matlab/catch22_DN_Spread_Std.c diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cade7146db3bdfc08f19dee42da332401a04948e GIT binary patch literal 8196 zcmeHMPj3@P6n`&CgWWV_6A}n2NETKlB%;XBls|{6i=C))`4cyeAW;Hl*Pb{l);nf* z9TUsW=(4pFbaH@3W(=Jj;gS>wmoI#qk|fG1Ry&^!?KVs4gi9a)7I9ur!37- zK}992sHl$^sOU7F(>Pn(p0bJ#s1F~gBcnc{po~uI=Oi4^R@Sse0i(b{1=QKSRQ7q@ z_5056vu|aQ6oiu7joKRVuiN&$C@vJ9sWKO_q2NJ6^y-N%k6yAnUiipuxLE-U%9!T&JogWT2Wgy|eRe zVQwZjce$`TliRs+p+Nq{x!v7t=EOJWzc1fwZ9m%iW%u##Dqqyk3>Zu0{|EIcHLt#< zQ^UXaQhQ-p`^kMd^3~|kF>8F{*!bl5)YS14(^DrWzCKm6j=4_#elrx?EODQQMZd#p z)>uS|m+L&JglvnFT#4DkxavKksfiR}i8b!NA6njS6K3-LfL!#)kg;H`8G4Pyjg5%K zD+zy9M5~9~_bWW|Vvh%_>oR)GTIFDaQ$(?Y#kQD=Zm}>Tdw{dD>V%;aG+A-`j_

WM}Rh|X;J!SKD?=R_REL;wFzz9`QlX?4^ zMrGg}T@h7b9UedreuF3Q6#ju{@Dg6bTO7sXcm~hm41R}~(8eQp?*!Fj?k)QD8T~UBqbJ7=r<|!Fx-&)@u_wDu>&H{Wc(~F z(W+Nro;V94TWIt%H)!V7(p_z~!mE)KMzcKE)eE{CxyuuU;H zfkV(A3x!Te)^H-$QVJ_nN@A&N-v1hP+(ADrp5Vx;qd$ak66h-i~>f1|EmHx zG+&)B((d>Eu1Y5&&e}Pu_o#{@a6M%ug_^#L0P64m!;t(OK?TRwwx=wOP%#$)QU=o) J1wN?)?*MmNS6~1D literal 0 HcmV?d00001 diff --git a/Matlab/DN_Mean.m b/Matlab/DN_Mean.m new file mode 100644 index 00000000..14bb42ed --- /dev/null +++ b/Matlab/DN_Mean.m @@ -0,0 +1,6 @@ +function out = DN_Mean(y) + + % no combination of single functions + coder.inline('never'); + + out = DN_Mean(y, 5); \ No newline at end of file diff --git a/Matlab/DN_Spread_Std.m b/Matlab/DN_Spread_Std.m new file mode 100644 index 00000000..ff9c6e8e --- /dev/null +++ b/Matlab/DN_Spread_Std.m @@ -0,0 +1,6 @@ +function out = DN_Spread_Std(y) + + % no combination of single functions + coder.inline('never'); + + out = DN_Spread_Std(y, 5); \ No newline at end of file diff --git a/wrap_Matlab/catch22_CO_Embed2_Dist_tau_d_expfit_meandiff.c b/wrap_Matlab/catch22_CO_Embed2_Dist_tau_d_expfit_meandiff.c index aa17c51e..e19e4f86 100644 --- a/wrap_Matlab/catch22_CO_Embed2_Dist_tau_d_expfit_meandiff.c +++ b/wrap_Matlab/catch22_CO_Embed2_Dist_tau_d_expfit_meandiff.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_DN_HistogramMode_5.c b/wrap_Matlab/catch22_DN_HistogramMode_5.c index a5b16617..be537418 100644 --- a/wrap_Matlab/catch22_DN_HistogramMode_5.c +++ b/wrap_Matlab/catch22_DN_HistogramMode_5.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_DN_Mean.c b/wrap_Matlab/catch22_DN_Mean.c new file mode 100644 index 00000000..4ed970a0 --- /dev/null +++ b/wrap_Matlab/catch22_DN_Mean.c @@ -0,0 +1,43 @@ +/*================================================================= + * + * + *=================================================================*/ +#include +#include "mex.h" + +#include "M_wrapper.h" + +#include "CO_AutoCorr.h" +#include "DN_HistogramMode_10.h" +#include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" +#include "DN_OutlierInclude.h" +#include "FC_LocalSimple.h" +#include "IN_AutoMutualInfoStats.h" +#include "MD_hrv.h" +#include "PD_PeriodicityWang.h" +#include "SB_BinaryStats.h" +#include "SB_CoarseGrain.h" +#include "SB_MotifThree.h" +#include "SB_TransitionMatrix.h" +#include "SC_FluctAnal.h" +#include "SP_Summaries.h" +#include "butterworth.h" +#include "fft.h" +#include "helper_functions.h" +#include "histcounts.h" +#include "splinefit.h" +#include "stats.h" + +void mexFunction( int nlhs, mxArray *plhs[], + int nrhs, const mxArray*prhs[] ) + +{ + + // check inputs and call feature C-function +M_wrapper_double( nlhs, plhs, nrhs, prhs, &DN_Mean, 1); + + return; + +} \ No newline at end of file diff --git a/wrap_Matlab/catch22_DN_Spread_Std.c b/wrap_Matlab/catch22_DN_Spread_Std.c new file mode 100644 index 00000000..d766c2ad --- /dev/null +++ b/wrap_Matlab/catch22_DN_Spread_Std.c @@ -0,0 +1,43 @@ +/*================================================================= + * + * + *=================================================================*/ +#include +#include "mex.h" + +#include "M_wrapper.h" + +#include "CO_AutoCorr.h" +#include "DN_HistogramMode_10.h" +#include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" +#include "DN_OutlierInclude.h" +#include "FC_LocalSimple.h" +#include "IN_AutoMutualInfoStats.h" +#include "MD_hrv.h" +#include "PD_PeriodicityWang.h" +#include "SB_BinaryStats.h" +#include "SB_CoarseGrain.h" +#include "SB_MotifThree.h" +#include "SB_TransitionMatrix.h" +#include "SC_FluctAnal.h" +#include "SP_Summaries.h" +#include "butterworth.h" +#include "fft.h" +#include "helper_functions.h" +#include "histcounts.h" +#include "splinefit.h" +#include "stats.h" + +void mexFunction( int nlhs, mxArray *plhs[], + int nrhs, const mxArray*prhs[] ) + +{ + + // check inputs and call feature C-function +M_wrapper_double( nlhs, plhs, nrhs, prhs, &DN_Spread_Std, 1); + + return; + +} \ No newline at end of file From e16181e15ec85fbb3171cf64592e536e2b34d465 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 4 Oct 2021 11:10:53 +1100 Subject: [PATCH 07/18] All c calls now final --- wrap_Matlab/M_wrapper.c | 2 ++ wrap_Matlab/catch22_CO_FirstMin_ac.c | 2 ++ wrap_Matlab/catch22_CO_HistogramAMI_even_2_5.c | 2 ++ wrap_Matlab/catch22_CO_f1ecac.c | 2 ++ wrap_Matlab/catch22_CO_trev_1_num.c | 2 ++ wrap_Matlab/catch22_DN_HistogramMode_10.c | 2 ++ wrap_Matlab/catch22_DN_OutlierInclude_n_001_mdrmd.c | 2 ++ wrap_Matlab/catch22_DN_OutlierInclude_p_001_mdrmd.c | 2 ++ wrap_Matlab/catch22_FC_LocalSimple_mean1_tauresrat.c | 2 ++ wrap_Matlab/catch22_FC_LocalSimple_mean3_stderr.c | 2 ++ wrap_Matlab/catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi.c | 2 ++ wrap_Matlab/catch22_MD_hrv_classic_pnn40.c | 2 ++ wrap_Matlab/catch22_PD_PeriodicityWang_th0_01.c | 2 ++ wrap_Matlab/catch22_SB_BinaryStats_diff_longstretch0.c | 2 ++ wrap_Matlab/catch22_SB_BinaryStats_mean_longstretch1.c | 2 ++ wrap_Matlab/catch22_SB_MotifThree_quantile_hh.c | 2 ++ wrap_Matlab/catch22_SB_TransitionMatrix_3ac_sumdiagcov.c | 2 ++ wrap_Matlab/catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1.c | 2 ++ .../catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1.c | 2 ++ wrap_Matlab/catch22_SP_Summaries_welch_rect_area_5_1.c | 2 ++ wrap_Matlab/catch22_SP_Summaries_welch_rect_centroid.c | 2 ++ 21 files changed, 42 insertions(+) diff --git a/wrap_Matlab/M_wrapper.c b/wrap_Matlab/M_wrapper.c index 09494e4d..eff6d5c3 100644 --- a/wrap_Matlab/M_wrapper.c +++ b/wrap_Matlab/M_wrapper.c @@ -3,6 +3,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_CO_FirstMin_ac.c b/wrap_Matlab/catch22_CO_FirstMin_ac.c index 8a7b480d..fdd46997 100644 --- a/wrap_Matlab/catch22_CO_FirstMin_ac.c +++ b/wrap_Matlab/catch22_CO_FirstMin_ac.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_CO_HistogramAMI_even_2_5.c b/wrap_Matlab/catch22_CO_HistogramAMI_even_2_5.c index e423b6f1..348f9334 100644 --- a/wrap_Matlab/catch22_CO_HistogramAMI_even_2_5.c +++ b/wrap_Matlab/catch22_CO_HistogramAMI_even_2_5.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_CO_f1ecac.c b/wrap_Matlab/catch22_CO_f1ecac.c index ddf60bf0..e46887c9 100644 --- a/wrap_Matlab/catch22_CO_f1ecac.c +++ b/wrap_Matlab/catch22_CO_f1ecac.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_CO_trev_1_num.c b/wrap_Matlab/catch22_CO_trev_1_num.c index d851f6e0..48542d81 100644 --- a/wrap_Matlab/catch22_CO_trev_1_num.c +++ b/wrap_Matlab/catch22_CO_trev_1_num.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_DN_HistogramMode_10.c b/wrap_Matlab/catch22_DN_HistogramMode_10.c index 3453af45..1d54f5d3 100644 --- a/wrap_Matlab/catch22_DN_HistogramMode_10.c +++ b/wrap_Matlab/catch22_DN_HistogramMode_10.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_DN_OutlierInclude_n_001_mdrmd.c b/wrap_Matlab/catch22_DN_OutlierInclude_n_001_mdrmd.c index e48a18e9..cf9cc439 100644 --- a/wrap_Matlab/catch22_DN_OutlierInclude_n_001_mdrmd.c +++ b/wrap_Matlab/catch22_DN_OutlierInclude_n_001_mdrmd.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_DN_OutlierInclude_p_001_mdrmd.c b/wrap_Matlab/catch22_DN_OutlierInclude_p_001_mdrmd.c index 828a0dee..5c489172 100644 --- a/wrap_Matlab/catch22_DN_OutlierInclude_p_001_mdrmd.c +++ b/wrap_Matlab/catch22_DN_OutlierInclude_p_001_mdrmd.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_FC_LocalSimple_mean1_tauresrat.c b/wrap_Matlab/catch22_FC_LocalSimple_mean1_tauresrat.c index b35fc4aa..db929ee8 100644 --- a/wrap_Matlab/catch22_FC_LocalSimple_mean1_tauresrat.c +++ b/wrap_Matlab/catch22_FC_LocalSimple_mean1_tauresrat.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_FC_LocalSimple_mean3_stderr.c b/wrap_Matlab/catch22_FC_LocalSimple_mean3_stderr.c index 6defde11..22c5442f 100644 --- a/wrap_Matlab/catch22_FC_LocalSimple_mean3_stderr.c +++ b/wrap_Matlab/catch22_FC_LocalSimple_mean3_stderr.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi.c b/wrap_Matlab/catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi.c index 52737453..f6349345 100644 --- a/wrap_Matlab/catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi.c +++ b/wrap_Matlab/catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_MD_hrv_classic_pnn40.c b/wrap_Matlab/catch22_MD_hrv_classic_pnn40.c index 2582c487..44e58cc8 100644 --- a/wrap_Matlab/catch22_MD_hrv_classic_pnn40.c +++ b/wrap_Matlab/catch22_MD_hrv_classic_pnn40.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_PD_PeriodicityWang_th0_01.c b/wrap_Matlab/catch22_PD_PeriodicityWang_th0_01.c index b6f430fe..81649be5 100644 --- a/wrap_Matlab/catch22_PD_PeriodicityWang_th0_01.c +++ b/wrap_Matlab/catch22_PD_PeriodicityWang_th0_01.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SB_BinaryStats_diff_longstretch0.c b/wrap_Matlab/catch22_SB_BinaryStats_diff_longstretch0.c index 1cc324e8..549eb7f4 100644 --- a/wrap_Matlab/catch22_SB_BinaryStats_diff_longstretch0.c +++ b/wrap_Matlab/catch22_SB_BinaryStats_diff_longstretch0.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SB_BinaryStats_mean_longstretch1.c b/wrap_Matlab/catch22_SB_BinaryStats_mean_longstretch1.c index c51ea19c..58660ec7 100644 --- a/wrap_Matlab/catch22_SB_BinaryStats_mean_longstretch1.c +++ b/wrap_Matlab/catch22_SB_BinaryStats_mean_longstretch1.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SB_MotifThree_quantile_hh.c b/wrap_Matlab/catch22_SB_MotifThree_quantile_hh.c index 21b47d4d..2643a1f4 100644 --- a/wrap_Matlab/catch22_SB_MotifThree_quantile_hh.c +++ b/wrap_Matlab/catch22_SB_MotifThree_quantile_hh.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SB_TransitionMatrix_3ac_sumdiagcov.c b/wrap_Matlab/catch22_SB_TransitionMatrix_3ac_sumdiagcov.c index d2a60360..10192276 100644 --- a/wrap_Matlab/catch22_SB_TransitionMatrix_3ac_sumdiagcov.c +++ b/wrap_Matlab/catch22_SB_TransitionMatrix_3ac_sumdiagcov.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1.c b/wrap_Matlab/catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1.c index 33d8da30..760faf17 100644 --- a/wrap_Matlab/catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1.c +++ b/wrap_Matlab/catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1.c b/wrap_Matlab/catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1.c index c754aea0..2c5c123b 100644 --- a/wrap_Matlab/catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1.c +++ b/wrap_Matlab/catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SP_Summaries_welch_rect_area_5_1.c b/wrap_Matlab/catch22_SP_Summaries_welch_rect_area_5_1.c index d9395a89..df2df80a 100644 --- a/wrap_Matlab/catch22_SP_Summaries_welch_rect_area_5_1.c +++ b/wrap_Matlab/catch22_SP_Summaries_welch_rect_area_5_1.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" diff --git a/wrap_Matlab/catch22_SP_Summaries_welch_rect_centroid.c b/wrap_Matlab/catch22_SP_Summaries_welch_rect_centroid.c index b2f7eef1..116c0a88 100644 --- a/wrap_Matlab/catch22_SP_Summaries_welch_rect_centroid.c +++ b/wrap_Matlab/catch22_SP_Summaries_welch_rect_centroid.c @@ -10,6 +10,8 @@ #include "CO_AutoCorr.h" #include "DN_HistogramMode_10.h" #include "DN_HistogramMode_5.h" +#include "DN_Mean.h" +#include "DN_Spread_Std.h" #include "DN_OutlierInclude.h" #include "FC_LocalSimple.h" #include "IN_AutoMutualInfoStats.h" From d10765299496a9c04b9069da4d78f921277f4eec Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Mon, 4 Oct 2021 14:55:40 +1100 Subject: [PATCH 08/18] Incremented version number in R DESCRIPTION --- wrap_R/catch22/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrap_R/catch22/DESCRIPTION b/wrap_R/catch22/DESCRIPTION index f04635e2..dd663cc1 100644 --- a/wrap_R/catch22/DESCRIPTION +++ b/wrap_R/catch22/DESCRIPTION @@ -1,7 +1,7 @@ Package: catch22 Type: Package Title: Subset of hctsa-features -Version: 0.1 +Version: 0.1.1 Date: 2018-09-29 Author: Carl H. Lubba Maintainer: Carl H. Lubba From e59a0915b7be340e01108c55934aa2517f566835 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Tue, 5 Oct 2021 14:35:37 +1100 Subject: [PATCH 09/18] Fixed main --- .DS_Store | Bin 8196 -> 8196 bytes C/main.c | 16 ++++++++++++++-- wrap_R/catch22/src/runAllTS.sh | 13 ------------- 3 files changed, 14 insertions(+), 15 deletions(-) delete mode 100755 wrap_R/catch22/src/runAllTS.sh diff --git a/.DS_Store b/.DS_Store index cade7146db3bdfc08f19dee42da332401a04948e..98ca5261d63a443958f33c969f1a9b434c4c22bc 100644 GIT binary patch delta 331 zcmZp1XmOa}&nU1lU^hRbz-Ar+Lq-iTQE>@TNhv9rcmd(0#N_PsqWsdl6zBY${355E z($t8|ggN41El<7}hZCU^vQfi{TB!H%1mlF-9duZAKGDTSj|E55_>o zAjS~JNX96}Xo!9$Mi9OEsE{zzwh|Ng-*Ocmd(0#N_PsqWsdl6zBY${355E z($shX{^E@Ma?j-aynv$Avdq--$*FMfo{70r|z5C7Jno zlP?MSaz@Or1)v$m81ULj3L-O+TQaP0!0>AlqF*oMU**@Ri{|BQK*EqY|SwqYk4fqdB7kqbH*mqYq;s dW6 Date: Tue, 5 Oct 2021 15:08:40 +1100 Subject: [PATCH 10/18] header fix --- C/main.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C/main.h b/C/main.h index 9c692468..7440f587 100644 --- a/C/main.h +++ b/C/main.h @@ -6,11 +6,10 @@ #include #include #include -#include /* Function Declarations */ //extern int main(int argc, const char * const argv[]); -extern int main(int argc, char * argv[], bool catch24); +extern int main(int argc, char * argv[]); #endif From 41be9e35943e31925cfdffbe0a904bf74c990be7 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Tue, 5 Oct 2021 20:27:06 +1100 Subject: [PATCH 11/18] Fixed feature list --- featureList.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/featureList.txt b/featureList.txt index 0e2703d7..f940c389 100644 --- a/featureList.txt +++ b/featureList.txt @@ -1,5 +1,7 @@ DN_HistogramMode_5 DN_HistogramMode_10 +DN_Mean +DN_Spread_Std CO_f1ecac CO_FirstMin_ac CO_HistogramAMI_even_2_5 From 59e6171be58d34aa3efa833c3886f6240dfe9a49 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Tue, 5 Oct 2021 20:31:29 +1100 Subject: [PATCH 12/18] README update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b323a34f..f90094c8 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,5 @@ And Julia users can use [this Julia package](https://github.com/brendanjohnharri - See language-specific usage information in the [wiki](https://github.com/chlubba/catch22/wiki/Installation-and-Testing). - __Important Note:__ _catch22_ features only evaluate _dynamical_ properties of time series and do not respond to basic differences in the location (e.g., mean) or spread (e.g., variance). - - If you think features of the raw distribution may be important for your application, we suggest you add them (in the simplest case, two additional features: the mean and standard deviation) to this feature set. + - If you think features of the raw distribution may be important for your application, we suggest you apply the function argument `catch24 = true` (`TRUE` in R, `True` in Python) to your call to the _catch22_ function in the language of your choice. - Note that time series are _z_-scored internally which means e.g., constant time series will lead to `NaN` outputs. From ae3e94cf321289674db435b3cdc21df7cb769ca7 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Fri, 15 Oct 2021 12:51:24 +1100 Subject: [PATCH 13/18] Python wrapper fix --- wrap_Python/catch22_wrap.c | 2 ++ wrap_Python/catch22_wrap_P3.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/wrap_Python/catch22_wrap.c b/wrap_Python/catch22_wrap.c index 0456f0d3..a1653990 100644 --- a/wrap_Python/catch22_wrap.c +++ b/wrap_Python/catch22_wrap.c @@ -4,6 +4,8 @@ #include "../C/CO_AutoCorr.h" #include "../C/DN_HistogramMode_10.h" #include "../C/DN_HistogramMode_5.h" +#include "../C/DN_Mean.h" +#include "../C/DN_Spread_Std.h" #include "../C/DN_OutlierInclude.h" #include "../C/FC_LocalSimple.h" #include "../C/IN_AutoMutualInfoStats.h" diff --git a/wrap_Python/catch22_wrap_P3.c b/wrap_Python/catch22_wrap_P3.c index 0f7c4492..791fa9b2 100644 --- a/wrap_Python/catch22_wrap_P3.c +++ b/wrap_Python/catch22_wrap_P3.c @@ -4,6 +4,8 @@ #include "../C/CO_AutoCorr.h" #include "../C/DN_HistogramMode_10.h" #include "../C/DN_HistogramMode_5.h" +#include "../C/DN_Mean.h" +#include "../C/DN_Spread_Std.h" #include "../C/DN_OutlierInclude.h" #include "../C/FC_LocalSimple.h" #include "../C/IN_AutoMutualInfoStats.h" From 60ffdd596907a123405ac23cefef126bdddc6a45 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Fri, 15 Oct 2021 16:15:55 +1100 Subject: [PATCH 14/18] Small python wrapper fixes --- wrap_Python/catch22_wrap.c | 12 ++++++++++++ wrap_Python/catch22_wrap_P3.c | 12 ++++++++++++ wrap_R/catch22/DESCRIPTION | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/wrap_Python/catch22_wrap.c b/wrap_Python/catch22_wrap.c index a1653990..9ba3252a 100644 --- a/wrap_Python/catch22_wrap.c +++ b/wrap_Python/catch22_wrap.c @@ -198,6 +198,16 @@ static PyObject * DN_HistogramMode_10_wrapper(PyObject * self, PyObject * args) return python_wrapper_double(args, &DN_HistogramMode_10, 1); } +static PyObject * DN_Mean_wrapper(PyObject * self, PyObject * args) +{ + return python_wrapper_double(args, &DN_Mean, 1); +} + +static PyObject * DN_Spread_Std_wrapper(PyObject * self, PyObject * args) +{ + return python_wrapper_double(args, &DN_Spread_Std, 1); +} + static PyObject * CO_f1ecac_wrapper(PyObject * self, PyObject * args) { return python_wrapper_int(args, &CO_f1ecac, 1); @@ -306,6 +316,8 @@ static PyObject * FC_LocalSimple_mean3_stderr_wrapper(PyObject * self, PyObject static PyMethodDef catch22Methods[] = { { "DN_HistogramMode_5", DN_HistogramMode_5_wrapper, METH_VARARGS, "bla" }, { "DN_HistogramMode_10", DN_HistogramMode_10_wrapper, METH_VARARGS, "bla" }, + { "DN_Mean", DN_Mean_wrapper, METH_VARARGS, "bla" }, + { "DN_Spread_Std", DN_Spread_Std_wrapper, METH_VARARGS, "bla" }, { "CO_f1ecac", CO_f1ecac_wrapper, METH_VARARGS, "bla" }, { "CO_FirstMin_ac", CO_FirstMin_ac_wrapper, METH_VARARGS, "bla" }, { "CO_HistogramAMI_even_2_5", CO_HistogramAMI_even_2_5_wrapper, METH_VARARGS, "bla" }, diff --git a/wrap_Python/catch22_wrap_P3.c b/wrap_Python/catch22_wrap_P3.c index 791fa9b2..981307fa 100644 --- a/wrap_Python/catch22_wrap_P3.c +++ b/wrap_Python/catch22_wrap_P3.c @@ -200,6 +200,16 @@ static PyObject * DN_HistogramMode_10_wrapper(PyObject * self, PyObject * args) return python_wrapper_double(args, &DN_HistogramMode_10, 1); } +static PyObject * DN_Mean_wrapper(PyObject * self, PyObject * args) +{ + return python_wrapper_double(args, &DN_Mean, 1); +} + +static PyObject * DN_Spread_Std_wrapper(PyObject * self, PyObject * args) +{ + return python_wrapper_double(args, &DN_Spread_Std, 1); +} + static PyObject * CO_f1ecac_wrapper(PyObject * self, PyObject * args) { return python_wrapper_int(args, &CO_f1ecac, 1); @@ -308,6 +318,8 @@ static PyObject * FC_LocalSimple_mean3_stderr_wrapper(PyObject * self, PyObject static PyMethodDef catch22Methods[] = { { "DN_HistogramMode_5", DN_HistogramMode_5_wrapper, METH_VARARGS, "bla" }, { "DN_HistogramMode_10", DN_HistogramMode_10_wrapper, METH_VARARGS, "bla" }, + { "DN_Mean", DN_Mean_wrapper, METH_VARARGS, "bla" }, + { "DN_Spread_Std", DN_Spread_Std_wrapper, METH_VARARGS, "bla" }, { "CO_f1ecac", CO_f1ecac_wrapper, METH_VARARGS, "bla" }, { "CO_FirstMin_ac", CO_FirstMin_ac_wrapper, METH_VARARGS, "bla" }, { "CO_HistogramAMI_even_2_5", CO_HistogramAMI_even_2_5_wrapper, METH_VARARGS, "bla" }, diff --git a/wrap_R/catch22/DESCRIPTION b/wrap_R/catch22/DESCRIPTION index dd663cc1..f04635e2 100644 --- a/wrap_R/catch22/DESCRIPTION +++ b/wrap_R/catch22/DESCRIPTION @@ -1,7 +1,7 @@ Package: catch22 Type: Package Title: Subset of hctsa-features -Version: 0.1.1 +Version: 0.1 Date: 2018-09-29 Author: Carl H. Lubba Maintainer: Carl H. Lubba From 7fc4bd3049276acb04e518ecc7acfbec358298a4 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Wed, 6 Apr 2022 23:38:43 +1000 Subject: [PATCH 15/18] Rearranging feature order --- .DS_Store | Bin 8196 -> 8196 bytes C/main.c | 56 +++++++++--------- wrap_Matlab/catch22_all.m | 100 ++++++++++++--------------------- wrap_Python/catch22/catch22.py | 4 +- wrap_Python/testing.py | 15 +++++ wrap_R/catch22/R/catch22_all.R | 59 +++++++++---------- 6 files changed, 108 insertions(+), 126 deletions(-) diff --git a/.DS_Store b/.DS_Store index 98ca5261d63a443958f33c969f1a9b434c4c22bc..992396fe86bd328256f39180143f1862b33cdd6b 100644 GIT binary patch delta 109 zcmZp1XmQwZRDjh&N5RB=a Date: Thu, 2 Jun 2022 17:31:44 +1000 Subject: [PATCH 16/18] catch24 --- .DS_Store | Bin 8196 -> 8196 bytes .vscode/settings.json | 6 + C/.DS_Store | Bin 0 -> 10244 bytes C/CO_AutoCorr.c | 20 +- C/CO_AutoCorr.h | 2 +- C/SB_MotifThree.c | 1 + C/main.c | 66 +++++-- wrap_Python/catch22/catch22.py | 16 +- wrap_R/.gitignore | 4 - wrap_R/catch22/.gitignore | 6 - wrap_R/catch22/DESCRIPTION | 11 -- wrap_R/catch22/NAMESPACE | 4 - wrap_R/catch22/R/RcppExports.R | 91 --------- wrap_R/catch22/R/catch22_all.R | 39 ---- wrap_R/catch22/src/Makevars | 1 - wrap_R/catch22/src/Makevars.win.in | 1 - wrap_R/catch22/src/RcppExports.cpp | 280 ---------------------------- wrap_R/catch22/src/catch22_wrap.cpp | 247 ------------------------ wrap_R/testing.R | 11 -- 19 files changed, 75 insertions(+), 731 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 C/.DS_Store delete mode 100644 wrap_R/.gitignore delete mode 100644 wrap_R/catch22/.gitignore delete mode 100644 wrap_R/catch22/DESCRIPTION delete mode 100644 wrap_R/catch22/NAMESPACE delete mode 100644 wrap_R/catch22/R/RcppExports.R delete mode 100644 wrap_R/catch22/R/catch22_all.R delete mode 100644 wrap_R/catch22/src/Makevars delete mode 100644 wrap_R/catch22/src/Makevars.win.in delete mode 100644 wrap_R/catch22/src/RcppExports.cpp delete mode 100644 wrap_R/catch22/src/catch22_wrap.cpp delete mode 100644 wrap_R/testing.R diff --git a/.DS_Store b/.DS_Store index 992396fe86bd328256f39180143f1862b33cdd6b..f8426ad12651b429466d48da6752a43521a1c19c 100644 GIT binary patch delta 434 zcmZp1XmOa}&&a`7YEG#D%ipnz1nA|TaFFcch zfq{|1IWxJeASow53CP(uSz1uZP)t-@LR3;nS|(mVI4LnXJH05sG%v+DKPSJ)DW^0w zUVy(iBfs1;IX^F;D77pzwS01_;4aRHOrSt;W>xBBLm|<6PGtuTpz%N;z@Q9aFfb@P zG%NtKIRqF(^78XifvN%^lFAO=P*ofZ+6;~i!3;4Bg$xZ0(-{^sY-KpeaE{?I!&ip? zjJ%9uj7p5!j5>^_jOL6EjGl~Mj6RHkj6sai5dBPyAX)^7Wg!AEk}+lTIiYmM$*dxR zJW1unP%ks!4j)BO_;4_kFr+dR14$Q#L?D@17F?8pNOw0`?pAwK|oH_Z0fV}W5 z1_lO32ItJ=vVx?X{3IY}^JFPOB@IzgF>z4|NlEE=0pX;?=lq=fBBz|v z)QHUF{Jh}Is?^E3g1dy`1^A0I^2y;e>fTjb1vV#VMA;6#v zVK6Xo2r!1^<>#exaw6;3ycmKRG8oDk`WR+0tYO%}aFpQ|!yATgj4X^| zj7p5!j3$h>jP{HkjGm0%i~)>+j6o3HOpH)dWS}%BlxB?Hd_yRmadNFF&*Wgy1Xnho z*+mSA3qb$VR9*}XBnG4)H30^x1yYd8f`Sx9 kUs-TbUQT{qI#8T(W1$VxW_F2hER(|pG9ht7ssWZv0HMos)&Kwi diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..979ab8a2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.rmd": "markdown", + "dn_outlierinclude.h": "c" + } +} \ No newline at end of file diff --git a/C/.DS_Store b/C/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cf004a38377dc04920e2ca4611c60e11f1463404 GIT binary patch literal 10244 zcmeHM!A=uV6uqyYVv0Z%5;rDYx@J1!Q z^90raFEWsG`6wftV{dl25flgt1OhZ+vr zdTJ+$)ujU`-2%YQbH=7*D8SwBuZm1D=x-87yS)ac4- z4m0avXW%0o4y}WYc#v}JY3(CagU^k2!Pb)q_gD$9_cY_#y*ROGzP6X;G?uoUAqM8$ zM;Elw9eqCr_JLWl`k)x?aI^Lq^os1D?>q7e-PZ$i1l|*L;~B2<6oB$G;T?X~A%njq zM|j14p458EOvfkn%*?zmL&P2-2iCL$|6{FdjLb&3y71Xl)z6lyWqdessJ6C`MZ}SO z%6s5t3~?SeR~J(T=kTePHtr$%mut)K^{l16J=UtSvyTu3yQ(`S4l4dP{+#%TJ(lz}neF-a}OTgI`I zJ}wKp0bMy0-r=W;xp;odlKlc|zJQ(55&Znmgm?I #include +#include #include //#include @@ -67,6 +68,18 @@ void run_features(double y[], int size, FILE * outfile, bool catch24) // z-score first for all. zscore_norm2(y, size, y_zscored); + + // GOOD + begin = clock(); + result = DN_OutlierInclude_n_001_mdrmd(y_zscored, size); + timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; + fprintf(outfile, "%.14f, %s, %f\n", result, "DN_OutlierInclude_n_001_mdrmd", timeTaken); + + // GOOD + begin = clock(); + result = DN_OutlierInclude_p_001_mdrmd(y_zscored, size); + timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; + fprintf(outfile, "%.14f, %s, %f\n", result, "DN_OutlierInclude_p_001_mdrmd", timeTaken); // GOOD begin = clock(); @@ -110,18 +123,6 @@ void run_features(double y[], int size, FILE * outfile, bool catch24) timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; fprintf(outfile, "%.14f, %s, %f\n", result, "CO_trev_1_num", timeTaken); - // GOOD - begin = clock(); - result = DN_OutlierInclude_p_001_mdrmd(y_zscored, size); - timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; - fprintf(outfile, "%.14f, %s, %f\n", result, "DN_OutlierInclude_p_001_mdrmd", timeTaken); - - // GOOD - begin = clock(); - result = DN_OutlierInclude_n_001_mdrmd(y_zscored, size); - timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; - fprintf(outfile, "%.14f, %s, %f\n", result, "DN_OutlierInclude_n_001_mdrmd", timeTaken); - //GOOD begin = clock(); result = FC_LocalSimple_mean1_tauresrat(y_zscored, size); @@ -204,13 +205,13 @@ void run_features(double y[], int size, FILE * outfile, bool catch24) // GOOD begin = clock(); - result = DN_Mean(y_zscored, size); + result = DN_Mean(y, size); timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Mean", timeTaken); // GOOD begin = clock(); - result = DN_Spread_Std(y_zscored, size); + result = DN_Spread_Std(y, size); timeTaken = (double)(clock()-begin)*1000/CLOCKS_PER_SEC; fprintf(outfile, "%.14f, %s, %f\n", result, "DN_Spread_Std", timeTaken); } else { @@ -233,6 +234,22 @@ void print_help(char *argv[], char msg[]) exit(1); } +// memory leak check; use with valgrind. +#if 0 +int main(int argc, char * argv[]) +{ + double * y = malloc(1000 * sizeof(double)); + + srand(42); + for (int i = 0; i < 1000; ++i) { + y[i] = rand() % RAND_MAX; + } + run_features(y, 1000, stdout); + free(y); +} +#endif + +#if 1 int main(int argc, char * argv[]) { FILE * infile, * outfile; @@ -303,8 +320,10 @@ int main(int argc, char * argv[]) return 0; } +#endif -int main2(int argc, char * argv[]) +#if 0 +int main(int argc, char * argv[]) { (void)argc; (void)argv; @@ -339,10 +358,10 @@ int main2(int argc, char * argv[]) double result; - result = DN_OutlierInclude_p_001_mdrmd(y, size); - printf("DN_OutlierInclude_p_001_mdrmd: %1.5f\n", result); result = DN_OutlierInclude_n_001_mdrmd(y, size); printf("DN_OutlierInclude_n_001_mdrmd: %1.5f\n", result); + result = DN_OutlierInclude_p_001_mdrmd(y, size); + printf("DN_OutlierInclude_p_001_mdrmd: %1.5f\n", result); result = DN_HistogramMode_5(y, size); printf("DN_HistogramMode_5: %1.3f\n", result); result = DN_HistogramMode_10(y, size); @@ -383,6 +402,19 @@ int main2(int argc, char * argv[]) printf("SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1: %1.5f\n", result); result = CO_trev_1_num(y, size); printf("CO_trev_1_num: %1.5f\n", result); + + int catch24; + printf("Do you want to run catch24? Enter 0 for catch22 or 1 for catch24."); + scanf("%d", &catch24); + + if (catch24 == 1) { + result = DN_Mean(y, size); + printf("DN_Mean: %1.5f\n", result); + result = DN_Spread_Std(y, size); + printf("DN_Spread_Std: %1.5f\n", result); + } else { + } return 0; } +#endif diff --git a/wrap_Python/catch22/catch22.py b/wrap_Python/catch22/catch22.py index 33fb4f76..5c7db77f 100644 --- a/wrap_Python/catch22/catch22.py +++ b/wrap_Python/catch22/catch22.py @@ -1,7 +1,7 @@ import catch22_C def catch22_all(data, catch24 = False): - + features = [ 'DN_HistogramMode_5', 'DN_HistogramMode_10', @@ -26,16 +26,14 @@ def catch22_all(data, catch24 = False): 'SP_Summaries_welch_rect_centroid', 'FC_LocalSimple_mean3_stderr' ] - - if catch24 == True: - features.append('DN_Mean') - features.append('DN_Spread_Std') - + + if catch24 is True: + features.append(['DN_Mean', 'DN_Spread_Std']) + data = list(data) - featureOut = [] for f in features: - featureFun = getattr(catch22_C, f) + featureFun = getattr(catch22_C, f) featureOut.append(featureFun(data)) - + return {'names': features, 'values': featureOut} \ No newline at end of file diff --git a/wrap_R/.gitignore b/wrap_R/.gitignore deleted file mode 100644 index 7579b1b6..00000000 --- a/wrap_R/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.RData -.Rhistory -codegen -*.tar.gz \ No newline at end of file diff --git a/wrap_R/catch22/.gitignore b/wrap_R/catch22/.gitignore deleted file mode 100644 index 795fe840..00000000 --- a/wrap_R/catch22/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.RData -.Rhistory -*.c -*.h -inst -man \ No newline at end of file diff --git a/wrap_R/catch22/DESCRIPTION b/wrap_R/catch22/DESCRIPTION deleted file mode 100644 index f04635e2..00000000 --- a/wrap_R/catch22/DESCRIPTION +++ /dev/null @@ -1,11 +0,0 @@ -Package: catch22 -Type: Package -Title: Subset of hctsa-features -Version: 0.1 -Date: 2018-09-29 -Author: Carl H. Lubba -Maintainer: Carl H. Lubba -Description: blabla -License: GPL (>= 2) -Imports: Rcpp (>= 0.12.15) -LinkingTo: Rcpp diff --git a/wrap_R/catch22/NAMESPACE b/wrap_R/catch22/NAMESPACE deleted file mode 100644 index a0537e62..00000000 --- a/wrap_R/catch22/NAMESPACE +++ /dev/null @@ -1,4 +0,0 @@ -useDynLib(catch22, .registration=TRUE) -exportPattern("^[[:alpha:]]+") -export("catch22_all") -importFrom(Rcpp, evalCpp) diff --git a/wrap_R/catch22/R/RcppExports.R b/wrap_R/catch22/R/RcppExports.R deleted file mode 100644 index e1f135dd..00000000 --- a/wrap_R/catch22/R/RcppExports.R +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by using Rcpp::compileAttributes() -> do not edit by hand -# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 - -DN_HistogramMode_5 <- function(x) { - .Call(`_catch22_DN_HistogramMode_5`, x) -} - -DN_HistogramMode_10 <- function(x) { - .Call(`_catch22_DN_HistogramMode_10`, x) -} - -CO_f1ecac <- function(x) { - .Call(`_catch22_CO_f1ecac`, x) -} - -CO_FirstMin_ac <- function(x) { - .Call(`_catch22_CO_FirstMin_ac`, x) -} - -CO_HistogramAMI_even_2_5 <- function(x) { - .Call(`_catch22_CO_HistogramAMI_even_2_5`, x) -} - -CO_trev_1_num <- function(x) { - .Call(`_catch22_CO_trev_1_num`, x) -} - -MD_hrv_classic_pnn40 <- function(x) { - .Call(`_catch22_MD_hrv_classic_pnn40`, x) -} - -SB_BinaryStats_mean_longstretch1 <- function(x) { - .Call(`_catch22_SB_BinaryStats_mean_longstretch1`, x) -} - -SB_TransitionMatrix_3ac_sumdiagcov <- function(x) { - .Call(`_catch22_SB_TransitionMatrix_3ac_sumdiagcov`, x) -} - -PD_PeriodicityWang_th0_01 <- function(x) { - .Call(`_catch22_PD_PeriodicityWang_th0_01`, x) -} - -CO_Embed2_Dist_tau_d_expfit_meandiff <- function(x) { - .Call(`_catch22_CO_Embed2_Dist_tau_d_expfit_meandiff`, x) -} - -IN_AutoMutualInfoStats_40_gaussian_fmmi <- function(x) { - .Call(`_catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi`, x) -} - -FC_LocalSimple_mean1_tauresrat <- function(x) { - .Call(`_catch22_FC_LocalSimple_mean1_tauresrat`, x) -} - -DN_OutlierInclude_p_001_mdrmd <- function(x) { - .Call(`_catch22_DN_OutlierInclude_p_001_mdrmd`, x) -} - -DN_OutlierInclude_n_001_mdrmd <- function(x) { - .Call(`_catch22_DN_OutlierInclude_n_001_mdrmd`, x) -} - -SP_Summaries_welch_rect_area_5_1 <- function(x) { - .Call(`_catch22_SP_Summaries_welch_rect_area_5_1`, x) -} - -SB_BinaryStats_diff_longstretch0 <- function(x) { - .Call(`_catch22_SB_BinaryStats_diff_longstretch0`, x) -} - -SB_MotifThree_quantile_hh <- function(x) { - .Call(`_catch22_SB_MotifThree_quantile_hh`, x) -} - -SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1 <- function(x) { - .Call(`_catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1`, x) -} - -SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1 <- function(x) { - .Call(`_catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1`, x) -} - -SP_Summaries_welch_rect_centroid <- function(x) { - .Call(`_catch22_SP_Summaries_welch_rect_centroid`, x) -} - -FC_LocalSimple_mean3_stderr <- function(x) { - .Call(`_catch22_FC_LocalSimple_mean3_stderr`, x) -} - diff --git a/wrap_R/catch22/R/catch22_all.R b/wrap_R/catch22/R/catch22_all.R deleted file mode 100644 index 24c1c1cc..00000000 --- a/wrap_R/catch22/R/catch22_all.R +++ /dev/null @@ -1,39 +0,0 @@ -catch22_all <- function(data, catch24 = FALSE){ - - names <- c('DN_OutlierInclude_n_001_mdrmd', - 'DN_OutlierInclude_p_001_mdrmd', - 'DN_HistogramMode_5', - 'DN_HistogramMode_10', - 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', - 'SB_TransitionMatrix_3ac_sumdiagcov', - 'FC_LocalSimple_mean1_tauresrat', - 'SB_MotifThree_quantile_hh', - 'CO_HistogramAMI_even_2_5', - 'CO_Embed2_Dist_tau_d_expfit_meandiff', - 'SB_BinaryStats_diff_longstretch0', - 'MD_hrv_classic_pnn40', - 'SB_BinaryStats_mean_longstretch1', - 'FC_LocalSimple_mean3_stderr', - 'SP_Summaries_welch_rect_area_5_1', - 'SP_Summaries_welch_rect_centroid', - 'CO_f1ecac', - 'CO_FirstMin_ac', - 'IN_AutoMutualInfoStats_40_gaussian_fmmi', - 'PD_PeriodicityWang_th0_01', - 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', - 'CO_trev_1_num') - - if(catch24){ - names <- append(names, c("DN_Mean", "DN_Spread_Std")) - } - - values = c() - - for (feature in names){ - fh = get(feature) - values = append(values, fh(data)) - } - - outData = data.frame(names = names, values = values) - return(outData) -} \ No newline at end of file diff --git a/wrap_R/catch22/src/Makevars b/wrap_R/catch22/src/Makevars deleted file mode 100644 index 745d6db8..00000000 --- a/wrap_R/catch22/src/Makevars +++ /dev/null @@ -1 +0,0 @@ -PKG_CPPFLAGS = -I../inst/include \ No newline at end of file diff --git a/wrap_R/catch22/src/Makevars.win.in b/wrap_R/catch22/src/Makevars.win.in deleted file mode 100644 index 745d6db8..00000000 --- a/wrap_R/catch22/src/Makevars.win.in +++ /dev/null @@ -1 +0,0 @@ -PKG_CPPFLAGS = -I../inst/include \ No newline at end of file diff --git a/wrap_R/catch22/src/RcppExports.cpp b/wrap_R/catch22/src/RcppExports.cpp deleted file mode 100644 index f6e49264..00000000 --- a/wrap_R/catch22/src/RcppExports.cpp +++ /dev/null @@ -1,280 +0,0 @@ -// Generated by using Rcpp::compileAttributes() -> do not edit by hand -// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 - -#include - -using namespace Rcpp; - -// DN_HistogramMode_5 -NumericVector DN_HistogramMode_5(NumericVector x); -RcppExport SEXP _catch22_DN_HistogramMode_5(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(DN_HistogramMode_5(x)); - return rcpp_result_gen; -END_RCPP -} -// DN_HistogramMode_10 -NumericVector DN_HistogramMode_10(NumericVector x); -RcppExport SEXP _catch22_DN_HistogramMode_10(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(DN_HistogramMode_10(x)); - return rcpp_result_gen; -END_RCPP -} -// CO_f1ecac -NumericVector CO_f1ecac(NumericVector x); -RcppExport SEXP _catch22_CO_f1ecac(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(CO_f1ecac(x)); - return rcpp_result_gen; -END_RCPP -} -// CO_FirstMin_ac -NumericVector CO_FirstMin_ac(NumericVector x); -RcppExport SEXP _catch22_CO_FirstMin_ac(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(CO_FirstMin_ac(x)); - return rcpp_result_gen; -END_RCPP -} -// CO_HistogramAMI_even_2_5 -NumericVector CO_HistogramAMI_even_2_5(NumericVector x); -RcppExport SEXP _catch22_CO_HistogramAMI_even_2_5(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(CO_HistogramAMI_even_2_5(x)); - return rcpp_result_gen; -END_RCPP -} -// CO_trev_1_num -NumericVector CO_trev_1_num(NumericVector x); -RcppExport SEXP _catch22_CO_trev_1_num(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(CO_trev_1_num(x)); - return rcpp_result_gen; -END_RCPP -} -// MD_hrv_classic_pnn40 -NumericVector MD_hrv_classic_pnn40(NumericVector x); -RcppExport SEXP _catch22_MD_hrv_classic_pnn40(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(MD_hrv_classic_pnn40(x)); - return rcpp_result_gen; -END_RCPP -} -// SB_BinaryStats_mean_longstretch1 -NumericVector SB_BinaryStats_mean_longstretch1(NumericVector x); -RcppExport SEXP _catch22_SB_BinaryStats_mean_longstretch1(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SB_BinaryStats_mean_longstretch1(x)); - return rcpp_result_gen; -END_RCPP -} -// SB_TransitionMatrix_3ac_sumdiagcov -NumericVector SB_TransitionMatrix_3ac_sumdiagcov(NumericVector x); -RcppExport SEXP _catch22_SB_TransitionMatrix_3ac_sumdiagcov(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SB_TransitionMatrix_3ac_sumdiagcov(x)); - return rcpp_result_gen; -END_RCPP -} -// PD_PeriodicityWang_th0_01 -NumericVector PD_PeriodicityWang_th0_01(NumericVector x); -RcppExport SEXP _catch22_PD_PeriodicityWang_th0_01(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(PD_PeriodicityWang_th0_01(x)); - return rcpp_result_gen; -END_RCPP -} -// CO_Embed2_Dist_tau_d_expfit_meandiff -NumericVector CO_Embed2_Dist_tau_d_expfit_meandiff(NumericVector x); -RcppExport SEXP _catch22_CO_Embed2_Dist_tau_d_expfit_meandiff(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(CO_Embed2_Dist_tau_d_expfit_meandiff(x)); - return rcpp_result_gen; -END_RCPP -} -// IN_AutoMutualInfoStats_40_gaussian_fmmi -NumericVector IN_AutoMutualInfoStats_40_gaussian_fmmi(NumericVector x); -RcppExport SEXP _catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(IN_AutoMutualInfoStats_40_gaussian_fmmi(x)); - return rcpp_result_gen; -END_RCPP -} -// FC_LocalSimple_mean1_tauresrat -NumericVector FC_LocalSimple_mean1_tauresrat(NumericVector x); -RcppExport SEXP _catch22_FC_LocalSimple_mean1_tauresrat(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(FC_LocalSimple_mean1_tauresrat(x)); - return rcpp_result_gen; -END_RCPP -} -// DN_OutlierInclude_p_001_mdrmd -NumericVector DN_OutlierInclude_p_001_mdrmd(NumericVector x); -RcppExport SEXP _catch22_DN_OutlierInclude_p_001_mdrmd(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(DN_OutlierInclude_p_001_mdrmd(x)); - return rcpp_result_gen; -END_RCPP -} -// DN_OutlierInclude_n_001_mdrmd -NumericVector DN_OutlierInclude_n_001_mdrmd(NumericVector x); -RcppExport SEXP _catch22_DN_OutlierInclude_n_001_mdrmd(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(DN_OutlierInclude_n_001_mdrmd(x)); - return rcpp_result_gen; -END_RCPP -} -// SP_Summaries_welch_rect_area_5_1 -NumericVector SP_Summaries_welch_rect_area_5_1(NumericVector x); -RcppExport SEXP _catch22_SP_Summaries_welch_rect_area_5_1(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SP_Summaries_welch_rect_area_5_1(x)); - return rcpp_result_gen; -END_RCPP -} -// SB_BinaryStats_diff_longstretch0 -NumericVector SB_BinaryStats_diff_longstretch0(NumericVector x); -RcppExport SEXP _catch22_SB_BinaryStats_diff_longstretch0(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SB_BinaryStats_diff_longstretch0(x)); - return rcpp_result_gen; -END_RCPP -} -// SB_MotifThree_quantile_hh -NumericVector SB_MotifThree_quantile_hh(NumericVector x); -RcppExport SEXP _catch22_SB_MotifThree_quantile_hh(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SB_MotifThree_quantile_hh(x)); - return rcpp_result_gen; -END_RCPP -} -// SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1 -NumericVector SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1(NumericVector x); -RcppExport SEXP _catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1(x)); - return rcpp_result_gen; -END_RCPP -} -// SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1 -NumericVector SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1(NumericVector x); -RcppExport SEXP _catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1(x)); - return rcpp_result_gen; -END_RCPP -} -// SP_Summaries_welch_rect_centroid -NumericVector SP_Summaries_welch_rect_centroid(NumericVector x); -RcppExport SEXP _catch22_SP_Summaries_welch_rect_centroid(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(SP_Summaries_welch_rect_centroid(x)); - return rcpp_result_gen; -END_RCPP -} -// FC_LocalSimple_mean3_stderr -NumericVector FC_LocalSimple_mean3_stderr(NumericVector x); -RcppExport SEXP _catch22_FC_LocalSimple_mean3_stderr(SEXP xSEXP) { -BEGIN_RCPP - Rcpp::RObject rcpp_result_gen; - Rcpp::RNGScope rcpp_rngScope_gen; - Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP); - rcpp_result_gen = Rcpp::wrap(FC_LocalSimple_mean3_stderr(x)); - return rcpp_result_gen; -END_RCPP -} - -static const R_CallMethodDef CallEntries[] = { - {"_catch22_DN_HistogramMode_5", (DL_FUNC) &_catch22_DN_HistogramMode_5, 1}, - {"_catch22_DN_HistogramMode_10", (DL_FUNC) &_catch22_DN_HistogramMode_10, 1}, - {"_catch22_CO_f1ecac", (DL_FUNC) &_catch22_CO_f1ecac, 1}, - {"_catch22_CO_FirstMin_ac", (DL_FUNC) &_catch22_CO_FirstMin_ac, 1}, - {"_catch22_CO_HistogramAMI_even_2_5", (DL_FUNC) &_catch22_CO_HistogramAMI_even_2_5, 1}, - {"_catch22_CO_trev_1_num", (DL_FUNC) &_catch22_CO_trev_1_num, 1}, - {"_catch22_MD_hrv_classic_pnn40", (DL_FUNC) &_catch22_MD_hrv_classic_pnn40, 1}, - {"_catch22_SB_BinaryStats_mean_longstretch1", (DL_FUNC) &_catch22_SB_BinaryStats_mean_longstretch1, 1}, - {"_catch22_SB_TransitionMatrix_3ac_sumdiagcov", (DL_FUNC) &_catch22_SB_TransitionMatrix_3ac_sumdiagcov, 1}, - {"_catch22_PD_PeriodicityWang_th0_01", (DL_FUNC) &_catch22_PD_PeriodicityWang_th0_01, 1}, - {"_catch22_CO_Embed2_Dist_tau_d_expfit_meandiff", (DL_FUNC) &_catch22_CO_Embed2_Dist_tau_d_expfit_meandiff, 1}, - {"_catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi", (DL_FUNC) &_catch22_IN_AutoMutualInfoStats_40_gaussian_fmmi, 1}, - {"_catch22_FC_LocalSimple_mean1_tauresrat", (DL_FUNC) &_catch22_FC_LocalSimple_mean1_tauresrat, 1}, - {"_catch22_DN_OutlierInclude_p_001_mdrmd", (DL_FUNC) &_catch22_DN_OutlierInclude_p_001_mdrmd, 1}, - {"_catch22_DN_OutlierInclude_n_001_mdrmd", (DL_FUNC) &_catch22_DN_OutlierInclude_n_001_mdrmd, 1}, - {"_catch22_SP_Summaries_welch_rect_area_5_1", (DL_FUNC) &_catch22_SP_Summaries_welch_rect_area_5_1, 1}, - {"_catch22_SB_BinaryStats_diff_longstretch0", (DL_FUNC) &_catch22_SB_BinaryStats_diff_longstretch0, 1}, - {"_catch22_SB_MotifThree_quantile_hh", (DL_FUNC) &_catch22_SB_MotifThree_quantile_hh, 1}, - {"_catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1", (DL_FUNC) &_catch22_SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1, 1}, - {"_catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1", (DL_FUNC) &_catch22_SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1, 1}, - {"_catch22_SP_Summaries_welch_rect_centroid", (DL_FUNC) &_catch22_SP_Summaries_welch_rect_centroid, 1}, - {"_catch22_FC_LocalSimple_mean3_stderr", (DL_FUNC) &_catch22_FC_LocalSimple_mean3_stderr, 1}, - {NULL, NULL, 0} -}; - -RcppExport void R_init_catch22(DllInfo *dll) { - R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); - R_useDynamicSymbols(dll, FALSE); -} diff --git a/wrap_R/catch22/src/catch22_wrap.cpp b/wrap_R/catch22/src/catch22_wrap.cpp deleted file mode 100644 index 7978414b..00000000 --- a/wrap_R/catch22/src/catch22_wrap.cpp +++ /dev/null @@ -1,247 +0,0 @@ -#include - -// include functions -extern "C" { -#include "CO_AutoCorr.h" -#include "DN_HistogramMode_10.h" -#include "DN_HistogramMode_5.h" -#include "DN_Mean.h" -#include "DN_Spread_Std.h" -#include "DN_OutlierInclude.h" -#include "FC_LocalSimple.h" -#include "IN_AutoMutualInfoStats.h" -#include "MD_hrv.h" -#include "PD_PeriodicityWang.h" -#include "SB_BinaryStats.h" -#include "SB_CoarseGrain.h" -#include "SB_MotifThree.h" -#include "SB_TransitionMatrix.h" -#include "SC_FluctAnal.h" -#include "SP_Summaries.h" -#include "butterworth.h" -#include "fft.h" -#include "helper_functions.h" -#include "histcounts.h" -#include "splinefit.h" -#include "stats.h" -} - -using namespace Rcpp; - -// universal wrapper for a function that takes a double array and its length -// and outputs a scalar double -NumericVector R_wrapper_double(NumericVector x, double (*f) (const double*, const int), int normalize) { - - int n = x.size(); - double * arrayC = new double[n]; - double out; - - int i; - for (i=0; i Date: Thu, 2 Jun 2022 20:48:01 +1000 Subject: [PATCH 17/18] Python fix --- wrap_Python/catch22/catch22.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrap_Python/catch22/catch22.py b/wrap_Python/catch22/catch22.py index 5c7db77f..574d034c 100644 --- a/wrap_Python/catch22/catch22.py +++ b/wrap_Python/catch22/catch22.py @@ -28,7 +28,8 @@ def catch22_all(data, catch24 = False): ] if catch24 is True: - features.append(['DN_Mean', 'DN_Spread_Std']) + features.append('DN_Mean') + features.append('DN_Spread_Std') data = list(data) featureOut = [] From fc9b8e40c9e7e3495a7df785f41c9cab57916b27 Mon Sep 17 00:00:00 2001 From: Trent Henderson Date: Thu, 2 Jun 2022 21:00:16 +1000 Subject: [PATCH 18/18] Fixed indentations --- .DS_Store | Bin 8196 -> 8196 bytes wrap_Python/.DS_Store | Bin 0 -> 6148 bytes wrap_Python/catch22/.DS_Store | Bin 0 -> 6148 bytes wrap_Python/catch22/catch22.py | 81 +++++++++++++++++---------------- 4 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 wrap_Python/.DS_Store create mode 100644 wrap_Python/catch22/.DS_Store diff --git a/.DS_Store b/.DS_Store index f8426ad12651b429466d48da6752a43521a1c19c..9355b90d4b5e9f9d39ce8f9914607f6303e53762 100644 GIT binary patch delta 156 zcmZp1XmOa}&nUPtU^hRb;AS3y<*buyMa6lN%8Ltln(r2`c+ZY*?S+{`YqhGJvv83CEFF9ZMp delta 32 mcmZp1XmOa}&&ai}wOc_`35i~ieBo9_Nm>qTieisd+c)gcoN8hi73`>3_=96mZ&>^t+v z9rlk77Yp0E|FHe!2Gnlw}!;8H;G0P#fucW>kl=#&nsBhdHK2o}XO#tTbjzA0UlGX5&XZx`a1IjXGB zCDslyjKNIk1&|j=iaByi6M0KHYphIhmRnbBpF%pnjw6@Wx5CoG5XRQ0fL{LA_WDwq zOhy5tz(1k@?+*?NV^?FYP;MQlL0?YwS=|a3Hj7{V6ksU-vSnM4eJmQ+q0uQ6=?-SzAjI+TGeg5<1 zcHgeI`!y@{dFS-Sn;Bcc5n9}Gz83d5<)b;ja$Z??*5ep4Ln@F8qynixD)6rr;GQj; z&KxtQ0;xbM@Tq{-he{VVft{l*9Sl0YYkVSYBjL(dj5QGv5<4m$;!6o1OV;zcsM(df(@otOs!>5`TT{DuPW Drk^N~ literal 0 HcmV?d00001 diff --git a/wrap_Python/catch22/catch22.py b/wrap_Python/catch22/catch22.py index 574d034c..ac961579 100644 --- a/wrap_Python/catch22/catch22.py +++ b/wrap_Python/catch22/catch22.py @@ -1,40 +1,41 @@ -import catch22_C - -def catch22_all(data, catch24 = False): - - features = [ - 'DN_HistogramMode_5', - 'DN_HistogramMode_10', - 'CO_f1ecac', - 'CO_FirstMin_ac', - 'CO_HistogramAMI_even_2_5', - 'CO_trev_1_num', - 'MD_hrv_classic_pnn40', - 'SB_BinaryStats_mean_longstretch1', - 'SB_TransitionMatrix_3ac_sumdiagcov', - 'PD_PeriodicityWang_th0_01', - 'CO_Embed2_Dist_tau_d_expfit_meandiff', - 'IN_AutoMutualInfoStats_40_gaussian_fmmi', - 'FC_LocalSimple_mean1_tauresrat', - 'DN_OutlierInclude_p_001_mdrmd', - 'DN_OutlierInclude_n_001_mdrmd', - 'SP_Summaries_welch_rect_area_5_1', - 'SB_BinaryStats_diff_longstretch0', - 'SB_MotifThree_quantile_hh', - 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', - 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', - 'SP_Summaries_welch_rect_centroid', - 'FC_LocalSimple_mean3_stderr' - ] - - if catch24 is True: - features.append('DN_Mean') - features.append('DN_Spread_Std') - - data = list(data) - featureOut = [] - for f in features: - featureFun = getattr(catch22_C, f) - featureOut.append(featureFun(data)) - - return {'names': features, 'values': featureOut} \ No newline at end of file +import catch22_C + + +def catch22_all(data, catch24=False): + + features = [ + 'DN_HistogramMode_5', + 'DN_HistogramMode_10', + 'CO_f1ecac', + 'CO_FirstMin_ac', + 'CO_HistogramAMI_even_2_5', + 'CO_trev_1_num', + 'MD_hrv_classic_pnn40', + 'SB_BinaryStats_mean_longstretch1', + 'SB_TransitionMatrix_3ac_sumdiagcov', + 'PD_PeriodicityWang_th0_01', + 'CO_Embed2_Dist_tau_d_expfit_meandiff', + 'IN_AutoMutualInfoStats_40_gaussian_fmmi', + 'FC_LocalSimple_mean1_tauresrat', + 'DN_OutlierInclude_p_001_mdrmd', + 'DN_OutlierInclude_n_001_mdrmd', + 'SP_Summaries_welch_rect_area_5_1', + 'SB_BinaryStats_diff_longstretch0', + 'SB_MotifThree_quantile_hh', + 'SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1', + 'SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1', + 'SP_Summaries_welch_rect_centroid', + 'FC_LocalSimple_mean3_stderr' + ] + + if catch24 is True: + features.append('DN_Mean') + features.append('DN_Spread_Std') + + data = list(data) + featureOut = [] + for f in features: + featureFun = getattr(catch22_C, f) + featureOut.append(featureFun(data)) + + return {'names': features, 'values': featureOut}