pub const FEATURE_NAMES: &[&str] = &[
"HR",
"eda_level_real",
"leads_contact_counts",
"steps",
"jerk_auto",
"log_energy",
"covariance",
"log_energy_ratio",
"zero_crossing_std",
"zero_crossing_avg",
"axis_mean",
"altim_std",
"kurtosis",
"sleep_coefficient",
"wrist_temperatures",
"rr_med",
"sdnn0595",
"rmssd0595",
"pnn20",
"coherence",
"ShEnRR",
"LF",
"HF",
"LF_HF",
"VLF",
"spectralEn",
"percent_good",
"sleep_stage_awake",
"sleep_stage_light",
"sleep_stage_deep",
"sleep_stage_rem",
"spo2",
"spo2_confidence",
"spo2_coverage",
];
pub const NUM_CHANNELS: usize = 34;
pub const TIME_STEPS: usize = 1440;
pub const NORM_PARAMS: &[(f64, f64)] = &[
(75.958_6, 16.188_7),
(4.176_7, 5.589_3),
(226.486_4, 67.331_2),
(5.167_9, 18.892_6),
(203.467_2, 30.056_3),
(53.080_4, 49.652_6),
(43.407_7, 13.952_9),
(44.848_3, 22.974_6),
(155.186_3, 28.237_8),
(51.004_3, 37.475_6),
(123.165_9, 21.471_0),
(0.004_2, 0.059_7),
(105.595_4, 66.849_5),
(7.262_3, 5.394_6),
(31.674_5, 2.578_9),
(856.830_4, 160.118_1),
(64.800_3, 55.585_0),
(65.342_1, 74.783_1),
(0.566_7, 0.262_3),
(0.180_8, 0.130_5),
(3.058_2, 0.667_3),
(1_551.837_6, 2_399.422_8),
(757.227_1, 1_873.923_9),
(4.126_5, 4.506_6),
(1_303.384_8, 1_906.101_7),
(2.525_5, 0.393_1),
(0.484_6, 0.343_9),
(0.042_4, 0.191_6),
(0.043_4, 0.202_1),
(0.185_5, 0.383_0),
(0.057_5, 0.230_1),
(95.201_9, 2.464_6),
(56.639_1, 42.106_4),
(50.125_1, 19.097_1),
];
pub const NON_NEGATIVE_CHANNELS: &[usize] = &[
3, 13, ];
#[derive(Debug, Clone)]
pub struct ChannelGroup {
pub category: &'static str,
pub primary: &'static [(&'static str, usize)],
pub random: &'static [(&'static str, usize)],
pub random_k: usize,
}
pub const CHANNEL_GROUPS: &[ChannelGroup] = &[
ChannelGroup {
category: "Heart",
primary: &[
("heart rate", 0), ("hrv rr", 15), ("hrv shannon entropy rr", 20), ("sdnn percentile", 16), ],
random: &[
("hr at rest mean", 0), ("hrv rr 80th percentile", 15),
("hrv shannon entropy rrd", 20),
("rmssd percentile mean", 17),
],
random_k: 2,
},
ChannelGroup {
category: "Activity",
primary: &[
("steps", 3),
("jerk", 4),
("log energy", 5),
("kurtosis", 12),
],
random: &[
("covariance", 6),
("log energy ratio", 7),
("zero crossing std", 8),
("zero crossing avg", 9),
("axis mean", 10),
("altim std", 11),
],
random_k: 1,
},
ChannelGroup {
category: "Sleep",
primary: &[
("sleep coefficient", 13),
],
random: &[],
random_k: 0,
},
ChannelGroup {
category: "EDA",
primary: &[
("eda level", 1),
("skin temperature slope", 14), ("wrist temperatures", 14),
],
random: &[
("leads contact counts", 2),
("ceda slope real micro siemens", 1),
],
random_k: 1,
},
];
pub const CAPTION_TOKEN_BUDGET: &[(&str, usize)] = &[
("low_level_caption", 512),
("middle_level_caption", 512),
("high_level_summary_caption", 256),
("high_level_all_caption", 1024),
("middle_low_level_caption", 1024),
("high_low_level_caption", 1024),
("high_middle_level_caption", 512),
("high_middle_low_level_caption", 1024),
];
pub const VOCAB_SIZE: usize = 32_000;
pub const VIT_WIDTH: usize = 768;
pub const VIT_DEPTH: usize = 12;
pub const VIT_MLP_DIM: usize = 3072;
pub const VIT_HEADS: usize = 12;
pub const PATCH_H: usize = 10;
pub const PATCH_W: usize = 2;
pub const NUM_PATCHES_T: usize = TIME_STEPS / PATCH_H;
pub const NUM_PATCHES_C: usize = (NUM_CHANNELS + PATCH_W - 1) / PATCH_W;
pub const NUM_PATCHES: usize = NUM_PATCHES_T * NUM_PATCHES_C;
pub const EMBED_DIM: usize = 768;
pub const TEMPERATURE_INIT: f32 = 10.0;
pub const BIAS_INIT: f32 = -10.0;
pub const DEFAULT_BATCH_SIZE: usize = 8;
pub const DEFAULT_LR: f64 = 5e-4;
pub const DEFAULT_WD: f64 = 1e-4;
pub const ADAM_BETA2: f64 = 0.999;
pub const GRAD_CLIP_NORM: f64 = 1.0;
pub const TOTAL_EXAMPLES: usize = 50_000_000;