Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add option to return final cross-validation score in SequentialFeatureSelector #31473

Open
@flaviorv

Description

@flaviorv

Describe the workflow you want to enable

Currently, when using SequentialFeatureSelector, it internally performs cross-validation to decide which features to select, based on the scoring function. However, the final cross-validation score (e.g., recall) is not returned by the SFS object.

Describe your proposed solution

Add an attribute (e.g., final_cv_score_) that stores the mean cross-validation score of the final model with the selected features. This would avoid having to run another cross-validation externally to get the final performance score.

Describe alternatives you've considered, if relevant

No response

Additional context

This feature would be especially useful when the scoring metric is expensive to compute, as it would avoid redundant cross-validation runs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions