Skip to content

Commit

Permalink
Better documentation for get_extreme_scores
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-mather committed Sep 20, 2024
1 parent 2ca8fac commit 721b5d9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/_model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,17 @@ function get_largest_differences<predictors extends string>(
>;
}

// 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<predictors extends string>(
scores: Data<predictors>,
summary: DataSummary<predictors>,
Expand Down

0 comments on commit 721b5d9

Please sign in to comment.