Repository navigation
fix(postprocessing): retain label metadata for array feature fitting - #587
Open
Hanabi9248 wants to merge 1 commit into
Open
Hanabi9248 wants to merge 1 commit into
Hanabi9248 wants to merge 1 commit into
Conversation
Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
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.
PostProcessingMeta.fit documents array-like features and a pandas Series target, but reads X.index (or X_post.index) after real estimator fitting. With ndarray features and protected attributes in the required target Series index, it raises AttributeError before the postprocessor can fit.
Preserve the existing feature index for DataFrames; otherwise use the corresponding target Series index in both prefit and split fit paths. No feature conversion/copy, prediction-input expansion, group inference, class mapping or calibration-policy change.
Actual validation against main 3487791:
Run: python tests/test_postprocessing_meta_array_fit.py -v
Full repository, Adult/download fixtures, other estimators and Python/sklearn versions were not run. Direct postprocessor predict* DataFrame requirements remain unchanged. This does not change the already-correct binary probability-column/label mapping. AI assistance was used for preparation/review; reported test results are actual local executions.