Feature/probe discrete variables#929
Conversation
|
Hi @solegalli! 👋 I've opened this PR to resolve issue #847 by adding support for discrete variables in The changes allow the selector to dynamically assign thresholds based on variable type: if I've included comprehensive tests for this new behavior and ensured all existing tests continue to pass. The code has also been formatted with black to match the repository's style guidelines. Note that there appears to be an unrelated, preexisting Could you please review this when you have a chance? I'm happy to make any necessary adjustments. Thanks! |
Resolves #847.
This PR expands the
ProbeFeatureSelectionfunctionality to allow distinguishing between discrete and continuous variables during threshold evaluations.Proposed Changes
variables_discreteparameter toProbeFeatureSelection(defaulting toNone)._get_features_to_drop()so that ifvariables_discreteis provided, discrete variables are compared strictly against the aggregate importance of generated discrete probes (e.g.,binary,discrete_uniform,poisson), while continuous variables are evaluated against continuous probes (e.g.,gaussian,uniform).variables_discreteisNone, the old behavior is preserved where all features are compared against all generated probes combined.How to Test
pytest tests/test_selection/test_probe_feature_selection.pyto confirm all existing and newly added test cases pass successfully.