Skip to main content

TukeyHSDTest

StatisticalTest
DashAI.back.statistical_tests.post_hoc_tests.TukeyHSDTest

Tukey HSD post-hoc test for pairwise comparison after a significant ANOVA test.

Controls the familywise error rate (FWER) when performing multiple pairwise comparisons. Assumes normality and homogeneity of variance (same assumptions as ANOVA). For non-normal data, use Nemenyi after Friedman instead.

Requires the statsmodels package.

References

  • Tukey, J. W. (1949). Comparing individual means in the analysis of variance. Biometrics, 5(2), 99-114.

Methods

get_metadata(cls) -> dict

Defined on TukeyHSDTest

Metadata for Tukey HSD Test.

run(self, scores: dict[str, list[float]], alpha: float = 0.05, statistic: float = None, p_value: float = None, **kwargs) -> DashAI.back.statistical_tests.statistical_test_result.StatisticalTestResult

Defined on TukeyHSDTest

Run Tukey's HSD post-hoc test after a significant ANOVA result.

Parameters

scores : dict[str, list[float]]
Mapping from model/run names to score vectors evaluated over the same folds.
alpha : float, optional
Significance level used to judge the adjusted pairwise comparisons, by default 0.05.
statistic : float or None, optional
Precomputed ANOVA statistic. If provided, it is reused instead of recomputing the omnibus statistic.
p_value : float or None, optional
Precomputed ANOVA p-value. If provided, it is reused instead of recomputing the omnibus statistic.

Returns

StatisticalTestResult
A result object with the omnibus ANOVA decision and the pairwise Tukey HSD comparisons.