Skip to content

v1.0.0

Choose a tag to compare

@benfulcher benfulcher released this 19 Oct 22:38
713f9c2

catch22 v1.0.0

Every catch22 feature now exactly reproduces a call in hctsa v3.0.0, the (nominally final) MATLAB release of hctsa (future work planned for pyhctsa), and catch22 is frozen to it.
The features are ~the same but algorithms have been tweaked slightly so that feature values change for most features (see below), so results computed with v1.0.0 are not directly comparable with earlier versions (but classification performance is unchanged).
PLEASE BE CAREFUL TO AVOID MIXING CALCULATIONS COMPUTED ACROSS DIFFERENT VERSIONS OF CATCH22!

Features match hctsa exactly

Each feature reproduces its hctsa call to a relative tolerance of 1e-9, checked on 1,010 time series (10 reference series and the 1,000 series of the 1000x1000 dataset). featureList.txt, now generated by run_features --list, lists for every feature its name, its short name, its name in v0.x, and the hctsa call that reproduces it (e.g., SP_Summaries(x_z,'fft',[],[],false).wq_50). CI checks the C against hctsa-computed values for all 24 features.

Short name v1.0 name Name in v0.x What changed
mode_5, mode_10 DN_HistogramMode_5, DN_HistogramMode_10 (same) bin edges as in hctsa
acf_timescale CO_FirstCrossing_acf_1e_pointOfCrossing CO_f1ecac renamed; N−1 (was N) when the autocorrelation never crosses 1/e
low_freq_power SP_Summaries_fft_area_5_1 SP_Summaries_welch_rect_area_5_1 spectrum from the fft periodogram
median_freq SP_Summaries_fft_wq_50 SP_Summaries_welch_rect_centroid (centroid_freq) now the median frequency of the power spectrum
forecast_error FC_LocalSimple_mean3_stde FC_LocalSimple_mean3_stderr renamed
whiten_timescale FC_LocalSimple_mean1_taurat FC_LocalSimple_mean1_tauresrat interpolated zero-crossings, as in hctsa
high_fluctuation MD_pNN_pnn40 MD_hrv_classic_pnn40 renamed
entropy_pairs SB_MotifThree_quantile_hh (same) bias-corrected entropy, as in hctsa
ami2 CO_HistogramAMI_even_5bin_ami2 CO_HistogramAMI_even_2_5 hctsa bin edges and bias correction
transition_variance SB_TransitionMatrix_quantile_3_ac_sumdiagcov SB_TransitionMatrix_3ac_sumdiagcov anti-aliased resampling, as in hctsa
embedding_dist CO_Embed2_Dist_tau_d_expfit_meandiff (same) hctsa binning and density normalization
rs_range, dfa SC_FluctAnal_2_rsrangefit_50_1_logi_prop_r1, SC_FluctAnal_2_dfa_50_1_2_logi_prop_r1 (same) hctsa's two-regime fit and minimum lengths
mean, std DN_mean, DN_Spread_std DN_Mean, DN_Spread_Std renamed

The other features (outlier_timing_pos, outlier_timing_neg, acf_first_min, stretch_high, stretch_decreasing, trev, ami_timescale, periodicity) are unchanged for series where they can be estimated. The documentation describes each feature and how it changed.

Always 22 numbers: masking

A feature that cannot be estimated (e.g., for a constant series, or dfa on a series shorter than 79 samples) is now set by default to a fixed value at the appropriate end of its range, so 22 real numbers are always returned. A constant series is treated as the limit of an infinitely slow, predictable series. Masking can be switched off (--no-mask on the command line, maskNaNs in MATLAB) to get NaN instead. A series containing NaN or Inf gives NaN for every feature and is never masked.

API

  • catch22_compute() (C/catch22.h) computes all features in one call, with masking, and is the single entry point for every language wrapper. catch22_feature_name(), catch22_short_name(), catch22_legacy_name() and catch22_hctsa_call() describe the features.
  • Command line: run_features [--catch22 | --catch24] [--no-mask] <infile> [<outfile>], and run_features --list.
  • MATLAB: one mex around catch22_compute() replaces the per-feature mex files. catch22_all(data, doCatch24, maskNaNs) still defaults to catch24 and returns which features were masked. The v0.x pure-MATLAB re-implementations (Matlab/, catch22.m) are removed: each feature's reference is now its hctsa call.

Tests

  • Reference test: the C against hctsa v3.0.0 for all 24 features.
  • Regression test against testData (expected outputs regenerated for v1.0; the pathological series now have outputs).
  • 49 analytic tests on series with known answers.
  • All three also run under AddressSanitizer and UndefinedBehaviorSanitizer in CI.

Classification performance

Across 140 UCR/UEA classification datasets (default split and 9 resamples), accuracy is unchanged:

Classifier v0.6.0 v1.0.0
Boosted trees 73.94% 74.14% (+0.21, Wilcoxon p = 0.53)
Random forest 76.97% 77.14% (+0.16, p = 0.20)

Downstream

The language wrappers (pycatch22, Rcatch22, Catch22.jl) will move to v1.0.0 and catch22_compute() in their next releases. Until then they compute the v0.6.0 features.