Repository navigation
PreTab 1.1.0
PreTab 1.1 adds per-column configuration, spline representations for groups of features, and spline penalty metadata. This release also fixes issues with input handling, missing values, cross-fitting, and serialization.
Highlights
- Per-feature configuration: Set the method, output width, and method-specific options for each column using
RepresentationConfigor a mapping. Existing string-valuedfeature_preprocessingentries remain supported (@mkumar73, #146). - Feature groups: Use
FeatureGroupto fit tensor-product or thin-plate splines across several numerical columns. Each group reports its fitted output width and feature lineage (@mkumar73, #146). - Spline penalty metadata: Use
PenaltySpecto match supported penalties to fitted coefficients, including penalties for individual axes in tensor-product splines (@mkumar73, #146). - Direct Polars input: Pass eager Polars DataFrames to
Preprocessorwithout PyArrow (@mkumar73, #146). - Optional task validation: Use
task_validation="warn"or"raise"to check task and target mismatches before fitting or representation search. The default remains"off"(@mkumar73, #146). - Bug fixes: Corrected column alignment, missing-value handling, spline evaluation, cross-fitting, and scikit-learn integration.
Upgrade notes
- PreTab 1.1 supports Python 3.11 to 3.13. Python 3.10 users should stay on
pretab<1.1or upgrade Python. - Missing indicators are emitted separately from numerical bases. Refitting affected pipelines can change output widths. Check the fitted feature names, order, and widths before using a refitted preprocessor with an existing trained model.
- Supported 1.0 specs still load in 1.1. Specs created with 1.1 may not load in 1.0. Unsupported estimator state raises a typed error.
What's Changed
Input handling and outputs
- Fixed column selection by label, internal step names, and feature-name handling for pandas and NumPy inputs (@ChrisW09, #100, #111, #108, #116, #135).
- Fixed pandas output to preserve the input index, kept the internal
ColumnTransformeron default output, and resolvedoutput_format="auto"once per fit (@ChrisW09, #68, #114, #113). - Fixed eager Polars DataFrame input handling without requiring PyArrow (@ChrisW09, #129).
- Added an error for NumPy inputs with the wrong number of columns at transform time (@ChrisW09, #112).
- Added a typed error when fitting on input with no rows (@xillig, #138).
- Fixed the stale-fit marker so it clears after a successful refit (@xillig, #139).
Categorical features and missing values
- Fixed boolean encoding, kept missing indicators separate from numerical representations, and preserved output blocks for all-missing columns (@ChrisW09, #99, #106, #130).
- Fixed missing-value handling in pandas categorical columns (@Boulea7, #74).
Splines, placement, and numerical transformations
- Changed I-spline evaluation to use a closed-form calculation and removed absolute clipping thresholds from M-spline evaluation (@ChrisW09, #98, #107).
- Fixed duplicate knot and placement locations on tied data, and made explicit
knot_locationstake precedence overoutput_dim(@ChrisW09, #101, #102, #119, #118). - Fixed classification target encoding for LightGBM placement, ranked CART splits by impurity decrease, and restricted placement searches to the resolved knot window (@ChrisW09, #105, #110, #109).
- Fixed spline policy defaults and evaluation outside the training range. Missing inputs now produce full NaN rows in B-, M-, I-, and thin-plate spline bases (@ChrisW09, #121, #122).
- Fixed
target_awarehandling when building representations. Unsupervised splines now ignorey, and multi-output spline targets raise an error (@ChrisW09, #123, #131). - Added an error when fitting a spline to a feature with only one observed value (@xillig, #137).
- Fixed Box-Cox output below the training minimum and removed the redundant unsupervised ReLU center at the data maximum (@ChrisW09, #104, #120).
Cross-fitting and representation search
- Fixed cross-fitting to preserve DataFrame inputs, missing indicators, and the output type returned by
transform(@ChrisW09, #103, #124, #125). - Changed cross-fitting to refit only the target-aware blocks of a wrapped
Preprocessorin each fold (@ChrisW09, #117). - Fixed
RepresentationSearchCVto follow the wrapped estimator's classifier API and task defaults, pass groups to the splitter, and forward fit parameters to the estimator (@ChrisW09, #115, #126, #127). - Added method validation before any search candidate is fitted (@xillig, #142).
Serialization, validation, and logging
- Added support for object arrays and built-in dtypes in specs, and fixed serialization to write strict JSON without NaN tokens (@ChrisW09, #132, #134).
- Added an explicit error for unknown task names (@ChrisW09, #128).
- Fixed
configure_loggingso it can raise the log level and respect host application logging (@ChrisW09, #133). - Clamped verbosity values to the supported range of 0 to 3 (@xillig, #141).
Testing, documentation, and release preparation
- Added scikit-learn
check_estimatorchecks for Fourier and kernel feature maps (@xillig, #143). - Updated the contribution commit guide to match the 1.x version policy (@xillig, #145).
- Prepared the stable release and updated the documentation and examples (@mkumar73, #147).
Contributors
Thank you to @ChrisW09, @Boulea7, @xillig, and @mkumar73 for contributing to this release.
New Contributors
Full Changelog: v1.0.0...v1.1.0