KSTest
- class hypex.comparators.KSTest(compare_by, grouping_role=None, target_role=None, baseline_role=None, reliability=0.05, key='', calc_kwargs={})[source]
Bases:
StatHypothesisTestingTwo-sample Kolmogorov-Smirnov test for numeric targets.
Tests whether two groups are drawn from the same distribution without assuming normality. Operates on raw data slices via scipy.
- Parameters:
compare_by (
Literal['groups','columns','columns_in_groups','cross','matched_pairs']) – Comparison mode ("groups","columns", etc.).grouping_role (
Optional[ABCRole]) – Role that identifies the group column.target_role (
Optional[ABCRole]) – Role that identifies the numeric target column(s).reliability (
float) – Significance level α (default 0.05).key (
Any) – Optional label for this test instance.