Skip to content

feat(preprocessor): expose representation parameters - #136

Open
Ananyapam7 wants to merge 2 commits into
OpenTabular:mainfrom
Ananyapam7:codex/representation-parameters
Open

Ananyapam7 wants to merge 2 commits into
OpenTabular:mainfrom
Ananyapam7:codex/representation-parameters

Conversation

@Ananyapam7

Copy link
Copy Markdown

Summary

  • Add representation_params for method-wide constructor options and allow feature-specific options in feature_preprocessing.
  • Apply feature-specific options last and validate explicit options against the representation registry.
  • Report the fitted width of one-hot blocks when an encoder drops or groups categories.
  • Document the API and cover precedence, invalid options, and fitted spec round trips.
pre = Preprocessor(
    numerical_method="quantile",
    representation_params={"quantile": {"n_quantiles": 128, "output_distribution": "normal"}},
    feature_preprocessing={"income": {"method": "quantile", "n_quantiles": 32}},
)

Validation

  • Full PreTab suite on Python 3.12: 2,556 passed, 59 skipped, 7 expected failures, 94.85% coverage.
  • Reproduced the same seven strict scikit-learn conformance xfails on upstream main.
  • Ruff, pre-commit checks, Pyright with the locked Python 3.10 dependencies, the Sphinx HTML build, and source and wheel builds passed.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 98.27586% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pretab/compose/factory.py 91.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants