fairlens.metrics.kruskal_wallis_boolean#
- kruskal_wallis_boolean(sr_a, sr_b, p_cutoff=0.1)[source]#
Metric that uses the Kruskal-Wallis H Test to obtain a p-value that is used to determine whether the possibility that the columns obtained by grouping the continuous series by the categorical series come from the same distribution. Used for proxy detection.
- Parameters
sr_a (pd.Series) – The categorical series to analyze, used for grouping the numerical one.
sr_b (pd.Series) – The numerical series to analyze.
p_cutoff (float) – The maximum admitted p-value for the distributions to be considered independent.
- Returns
Bool value representing whether or not the two series are correlated.
- Return type
bool