Skip to content

Allow iv as a selection_criteria metric for continuous targets - #396

Open
lcrmorin wants to merge 1 commit into
guillermo-navas-palencia:masterfrom
lcrmorin:fix-selection-criteria-iv-continuous
Open

Allow iv as a selection_criteria metric for continuous targets#396
lcrmorin wants to merge 1 commit into
guillermo-navas-palencia:masterfrom
lcrmorin:fix-selection-criteria-iv-continuous

Conversation

@lcrmorin

Copy link
Copy Markdown

Fixes #307. ContinuousBinningTable already computes and exposes IV via .iv, identically to the binary case, but it was never added to BinningProcess's _METRICS config, so selection_criteria={"iv": ...} raised ValueError for continuous targets and summary() never showed an iv column even though the value was directly accessible via get_binned_variable(name).binning_table.iv. Added iv to the continuous metrics list and to the per-variable stats dict in _binning_selection_criteria(), mirroring the binary branch. Added a regression test verifying summary() now includes iv (matching the binning table's own value) and that selection_criteria on iv filters correctly for continuous targets. Verified the test fails against the pre-fix code.

@lcrmorin
lcrmorin force-pushed the fix-selection-criteria-iv-continuous branch from 184d00c to 244ac7d Compare August 23, 2026 18:59
@lcrmorin lcrmorin mentioned this pull request Aug 24, 2026
16 tasks
@guillermo-navas-palencia guillermo-navas-palencia added this to the v1.1.0 milestone Aug 27, 2026
@guillermo-navas-palencia guillermo-navas-palencia added the enhancement New feature or request label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selection criterion parameter _selection_criteria_ set to IV throws error for binning with continuous target

2 participants