Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Adding feature selection operations #1398

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

seraphimstreets
Copy link

Added two new feature selection operations to the dffml.operations.data plugin, select_k_best and select_percentile. These are based entirely on the Sklearn functions:

https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectKBest

https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectPercentile.html#sklearn.feature_selection.SelectPercentile

Corresponding unit tests have also been added. This is part of the specifications for the GSOC project: #968.

)
async def select_percentile(data, target_data, score_func=f_classif, percentile=10):
"""
Select a certain top percentile of features, based on the score function.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Select a certain top percentile of features, based on the score function.
Select a certain top percentile of features, based on the score function.
References:
- https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectPercentile.html

@pdxjohnny pdxjohnny added the awaiting maintainer The PR is waiting for a maintainer to review it label Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting maintainer The PR is waiting for a maintainer to review it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants