Skip to content

add_relative_skill() runs Wilcoxon tests whose p-values it then discards #1222

Description

@annakrystalli

Spun out from #1221 as suggested.

add_relative_skill() returns only relative-skill columns: it drops pval and adj_pval before returning. But it calls through to get_pairwise_comparisons() with the default test_type = "non_parametric", so wilcox.test() runs for every model pair (choose(n, 2) per metric per group) and the results are then thrown away.

For callers that only want relative skill (which is what add_relative_skill() is for), those tests are pure overhead. On the FluSight benchmark in #1221 that is ~16.4 s (2.4% of the eval-data build), all discarded. It also produces "cannot compute exact p-value with ties" warnings whenever the scores tie.

Proposal: default add_relative_skill(test_type = NULL), or otherwise let relative-skill-only callers skip the test. Since add_relative_skill() discards the p-values regardless, this changes no output, only removing the wasted computation and the warnings.

get_pairwise_comparisons() itself legitimately returns p-values, so its default is fine; this is specifically about add_relative_skill() computing then discarding them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions