Skip to main content

Module statistical

Module statistical 

Source
Expand description

Level-1 (statistical) caption generation.

Produces a text description of the mean, maximum, minimum, and standard deviation of every sensor channel, grouped by physiological category.

§Pipeline

  1. Denormalise the input (T × C) array back to physical units.
  2. Optionally apply the missingness mask (set imputed values to NaN).
  3. For each physiological group in crate::constants::CHANNEL_GROUPS: a. Compute stats for the primary channels. b. Sample random_k additional channels from the random pool. c. Format each channel description using a randomly selected template.
  4. Concatenate all group descriptions into a single string.

§Example output

For Heart, heart rate mean, max, min, std are 72.1, 95.3, 58.4, 8.2.
hrv rr exhibits a mean of 820.4, with range 960.0 to 680.0 and a
standard deviation of 45.1.
For Activity, steps mean, max, min, std are 3.2, 12.0, 0.0, 2.1. ...

Functions§

generate_statistical_caption
Generate a level-1 statistical caption.