WilcoxonSRTest
DashAI.back.statistical_tests.WilcoxonSRTest
Non-parametric alternative to the paired t-test for related samples.
This implementation uses the Wilcoxon signed-rank test on the paired score differences between two models evaluated on the same folds. It is suitable when the paired differences are not approximately normal and is commonly used as a robust alternative to the paired t-test.
References
- https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.wilcoxon.html
- Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6), 80-83.
Methods
get_metadata(cls) -> dict
WilcoxonSRTestReturn UI metadata describing the test capabilities and interpretation.
run(self, scores: dict[str, list[float]], alpha: float = 0.05, alternative: str = 'two-sided', correction_method: str = None, **kwargs) -> DashAI.back.statistical_tests.statistical_test_result.StatisticalTestResult
WilcoxonSRTestRun the Wilcoxon signed-rank test on paired score differences.
Parameters
- scores : dict[str, list[float]]
- Mapping from model/run names to paired score vectors.
- alpha : float, optional
- Significance level used to decide whether the null hypothesis is rejected, by default 0.05.
- alternative : str, optional
- Direction of the alternative hypothesis:
two-sided,greater, orless. - correction_method : str or None, optional
- Method used to adjust p-values when more than two models are being compared.
Returns
- StatisticalTestResult
- A result object with the signed-rank statistic, p-value, and the significance decision.