Repository navigation
Conversation
get_feature_info() measures a numerical block's width by transforming a one-row probe with the block's last step. Box-Cox needs strictly positive input, but the probe is only positive (1e-5) for a block with a "minmax" step, i.e. under the default scaling. With scaling="standardization" or scaling=None the probe is 0.0, the transform fails, and the feature was reported with dimension=None although it has one column. When the probe cannot be transformed, the width now comes from the block's fitted span in output_indices_, which is the feature's true output dimension.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
get_feature_info()measures a numerical block's width by transforming a one-row probe with the block's last step. Box-Cox needs strictly positive input, but the probe is only positive (1e-5) for a block with a"minmax"step. Withscaling="standardization"orscaling=Nonethe probe is0.0, the transform fails, and the feature is reported withdimension=None.Fix
When the probe cannot be transformed, the width comes from the block's fitted span in
output_indices_(each block holds one feature). The change is local: #136 edits the one-hot branch of the same function, and the two merge cleanly.Tests
tests/compose/test_inspection.py, plus an invariant intests/integration/test_preprocessor.py: the reported dimension equalsoutput_dims_for nine methods under all threescalingvalues.Validation
Checks: full suite (2574 passed, 59 skipped, 7 xfailed, coverage >= 94.79%),
ruff format/ruff check, pyright (no new diagnostics), docs build with-W,scripts/quickstart.py. Merges cleanly withmainand with #136.