API Reference

Main Classes

High-level experiment runners that compose the lower-level building blocks.

AATest

A class for conducting A/A tests with configurable parameters.

ABTest

A class for conducting A/B tests with configurable statistical tests and multiple testing correction.

HomogeneityTest

A class for conducting homogeneity tests between the groups.

matching.Matching

A class for performing matching analysis with configurable distance metrics and quality tests.

Comparators

All comparators live in hypex.comparators.

Hypothesis Tests

Backend-adaptive tests — automatically select the best implementation for the active dataset backend (pandas vs. Spark).

comparators.TTest

Two-sample t-test for numeric targets.

comparators.Chi2Test

Chi-square test of independence for categorical targets.

comparators.KSTest

Two-sample Kolmogorov-Smirnov test for numeric targets.

comparators.UTest

Mann-Whitney U test (Wilcoxon rank-sum) for numeric targets.

Group Metrics

comparators.GroupDifference

comparators.GroupSizes

comparators.PSI

comparators.MahalanobisDistance

Power & Sample Size

comparators.PowerTesting

comparators.MDEBySize

Base Classes

Extend these to implement custom comparators.

comparators.Comparator

comparators.StatHypothesisTesting

Splitters

splitters.AASplitter

splitters.AASplitterWithStratification

Transformers

Pre-processing steps applied to Dataset objects.

transformers.NaFiller

transformers.NanFilter

transformers.OutliersFilter

transformers.ConstFilter

transformers.CorrFilter

transformers.CVFilter

transformers.DummyEncoder

transformers.TypeCaster

transformers.CategoryAggregator

transformers.CUPEDTransformer

transformers.Shuffle

Experiments

Pipeline runners that chain executors over ExperimentData.

experiments.Experiment

experiments.GroupExperiment

experiments.OnRoleExperiment

experiments.CycledExperiment

Reporters

reporters.Reporter

reporters.DatasetReporter

reporters.DictReporter

reporters.HomoDatasetReporter

reporters.HomoDictReporter

Operators

operators.SMD

Calculators

executor.MinSampleSize

A calculator for estimating the minimum required sample size for multi-group comparisons.

Dataset Module

dataset.Dataset

dataset.ExperimentData

Roles

Roles tag columns with semantic meaning so executors can locate them without hard-coding column names.

dataset.TargetRole

dataset.TreatmentRole

dataset.GroupingRole

dataset.FeatureRole

dataset.InfoRole

dataset.PreTargetRole

dataset.StatisticRole

dataset.StratificationRole

dataset.FilterRole

dataset.AdditionalTargetRole

dataset.AdditionalFeatureRole

dataset.AdditionalGroupingRole

dataset.AdditionalMatchingRole

dataset.AdditionalTreatmentRole