autoqild.utilities.statistical_testsΒΆ
Implementation of paired t-test and wilcoxon_signed_rank_test used to detect leakage using blind classifiers.
Functions
|
Performs a paired t-test on two sets of values with and without correction. |
|
Performs the Wilcoxon signed-rank test on two sets of accuracies. |
- autoqild.utilities.statistical_tests.paired_ttest(x1, x2, n_training_folds, n_test_folds, correction=True, alternative='two-sided', verbose=False)[source]ΒΆ
Performs a paired t-test on two sets of values with and without correction.
- Parameters:
x1 (ndarray) β First set of values.
x2 (ndarray) β Second set of values.
n_training_folds (int) β Number of training folds.
n_test_folds (int) β Number of test folds.
correction (bool, optional) β If True, applies a correction to the variance (default is True).
alternative (str, optional) β Defines the alternative hypothesis (default is βtwo-sidedβ).
verbose (bool, optional) β If True, outputs additional logging information (default is False).
- Returns:
p_value β The p-value from the paired t-test.
- Return type:
float
- autoqild.utilities.statistical_tests.wilcoxon_signed_rank_test(accuracies, accuracies2, alternative='two-sided', verbose=False)[source]ΒΆ
Performs the Wilcoxon signed-rank test on two sets of accuracies.
- Parameters:
accuracies (ndarray) β First set of accuracy values.
accuracies2 (ndarray) β Second set of accuracy values.
alternative (str, optional) β Defines the alternative hypothesis (default is βtwo-sidedβ).
verbose (bool, optional) β If True, outputs additional logging information (default is False).
- Returns:
p_value β The p-value from the Wilcoxon signed-rank test.
- Return type:
float