calculate_sample_entropy

Function calculate_sample_entropy 

Source
pub fn calculate_sample_entropy<F>(ts: &Array1<F>, m: usize, r: F) -> Result<F>
where F: Float + FromPrimitive + Debug,
Expand description

Calculate sample entropy

Sample entropy (SampEn) is a modification of approximate entropy that eliminates self-matching to provide a more consistent and less biased complexity measure.

§Arguments

  • ts - Input time series
  • m - Pattern length (typically 2)
  • r - Tolerance for matching patterns

§Returns

Sample entropy value (higher values indicate more irregularity)