Commit 3b48761
committed
rework imputer tests to check behaviour, not just shapes
Rewrite test_imputers.py as a DRY protocol-driven suite: TestImputerProtocol
holds the shared contract (full coalition == model(x), present features use x,
missing features don't leak x, fit/refit behaviour, random_state reproducibility);
per-imputer classes cover what's unique (Baseline mean-from-background, Marginal
joint-vs-per-feature sampling on dependent data, Gaussian closed-form conditional
mean, GaussianCopula rank round-trip, Generative cluster-aware neighbourhood
sampling, TabPFN remove-and-contextualize); TestCrossImputerAgreement asserts
relationships across imputers (baseline == marginal on constant background,
gaussian ~ marginal on independent data, copula ~ gaussian on standard normal).
https://claude.ai/code/session_01XN6xQdEpvZHekXYnRuJwyT1 parent 943f9b4 commit 3b48761
1 file changed
Lines changed: 650 additions & 84 deletions
0 commit comments