Skip to content

Pass sklearn check_estimator test suite #39

Description

@jc-macdonald

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTest coverage and test infrastructure

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions