Summary
Add test_sklearn_compat.py that runs sklearn's check_estimator on all public estimator/transformer classes and passes.
Details
This is the acceptance test for full sklearn compatibility. It verifies that:
VBPCA passes all applicable check_estimator checks
MissingAwareStandardScaler, MissingAwareMinMaxScaler, MissingAwareOneHotEncoder, AutoEncoder all pass
- VBPCApy works in
sklearn.pipeline.Pipeline
GridSearchCV can tune VBPCA hyperparameters
clone() correctly round-trips all parameters
Test file structure
from sklearn.utils.estimator_checks import parametrize_with_checks
@parametrize_with_checks([VBPCA(n_components=2)])
def test_sklearn_compatible(estimator, check):
check(estimator)
Plus integration tests:
- Pipeline:
Pipeline([('scaler', MissingAwareStandardScaler()), ('pca', VBPCA(n_components=2))]) fit/transform
- GridSearchCV: sweep
n_components with cross-validation
- clone: verify parameter fidelity
Depends on
Acceptance criteria
pytest tests/test_sklearn_compat.py passes with zero failures
- No
xfail or skip markers on check_estimator tests
Summary
Add
test_sklearn_compat.pythat runs sklearn'scheck_estimatoron all public estimator/transformer classes and passes.Details
This is the acceptance test for full sklearn compatibility. It verifies that:
VBPCApasses all applicablecheck_estimatorchecksMissingAwareStandardScaler,MissingAwareMinMaxScaler,MissingAwareOneHotEncoder,AutoEncoderall passsklearn.pipeline.PipelineGridSearchCVcan tuneVBPCAhyperparametersclone()correctly round-trips all parametersTest file structure
Plus integration tests:
Pipeline([('scaler', MissingAwareStandardScaler()), ('pca', VBPCA(n_components=2))])fit/transformn_componentswith cross-validationDepends on
Acceptance criteria
pytest tests/test_sklearn_compat.pypasses with zero failuresxfailorskipmarkers on check_estimator tests