Paired statistical tests
PairedTest
Bases: StatisticalTest
perform(df_list)
Method which performs the chosen paired statistical test.
Since it's a paired test, the final result is a pandas DataFrame which contains learning
schemas compared in pair.
For example if you call the perform()
method by passing a list containing three different DataFrames, one for
each learning schema to compare:
# Ttest as example since it's a Paired Test
Ttest().perform([user_df1, user_df2, user_df3])
You will obtain a DataFrame comparing all different combinations:
- (system1, system2)
- (system1, system3)
- (system2, system3)
The first value of each cell is the statistic, the second is the p-value
PARAMETER | DESCRIPTION |
---|---|
df_list |
List containing DataFrames with several metrics to compare, preferably metrics computed for each user. One DataFrame corresponds to one learning schema |
RETURNS | DESCRIPTION |
---|---|
pd.DataFrame
|
A Pandas DataFrame where each combination of learning schemas are compared in pair. The first value of each cell is the statistic, the second is the p-value |
Source code in clayrs/evaluation/statistical_test.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
|
Ttest
Bases: PairedTest
Calculate the T-test for the means of two independent samples of scores.
This is a two-sided test for the null hypothesis that 2 independent samples have identical average (expected) values. This test assumes that the populations have identical variances by default.
Wilcoxon
Bases: PairedTest
Compute the Wilcoxon rank-sum statistic for two samples.
The Wilcoxon rank-sum test tests the null hypothesis that two sets of measurements are drawn from the same distribution. The alternative hypothesis is that values in one sample are more likely to be larger than the values in the other sample.