From 721b5d9e918631490304b11d816eb775f7a472fe Mon Sep 17 00:00:00 2001 From: marius-mather Date: Fri, 20 Sep 2024 11:29:05 +1000 Subject: [PATCH] Better documentation for get_extreme_scores --- app/_model/model.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/_model/model.ts b/app/_model/model.ts index f02c240..bcfac39 100644 --- a/app/_model/model.ts +++ b/app/_model/model.ts @@ -63,10 +63,17 @@ function get_largest_differences( >; } -// Find any scores where the predictor/column's z-score differs from -// other scores by 2 SDs // TODO: should this be scores that differ from *all* other scores by // at least 2 SDs, i.e. find the smallest difference rather than largest? +/** + * Find any scores where the predictor/column's z-score differs from + * other scores by multiple standard deviations (as determined by threshold) + * + * @param scores scores for each predictor + * @param summary a DataSummary object containing the relevant means and SDs to compare against + * @param threshold number of SDs to consider an extreme difference. Use a negative number + * to find scores that are *lower* than other predictors by that many SDs + */ export function get_extreme_scores( scores: Data, summary: DataSummary,