Skip to content

DOC example on feature selection using negative tol values #26205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 26, 2023

Conversation

rprkh
Copy link
Contributor

@rprkh rprkh commented Apr 18, 2023

Reference Issues/PRs

Closes #25525

What does this implement/fix? Explain your changes.

Includes an example that demonstrates feature selection using SequentialFeatureSelector with negative values of tol.

Any other comments?

@rprkh
Copy link
Contributor Author

rprkh commented Apr 18, 2023

Added the changes.

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, what do others think?

@@ -143,3 +143,67 @@
# attribute. The forward SFS is faster than the backward SFS because it only
# needs to perform `n_features_to_select = 2` iterations, while the backward
# SFS needs to perform `n_features - n_features_to_select = 8` iterations.

# %%
# Selecting features using Sequential Feature Selection and negative tolerance values
Copy link
Member

Choose a reason for hiding this comment

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

This seems like a quite long title. My suggestion is to remove the title Discussion to keep the text as part of the narrative of the Selecting features with Sequential Feature Selection section. The this whole block can become a subsection called Using negative tolerance values or something similar.

@rprkh
Copy link
Contributor Author

rprkh commented Apr 22, 2023

Added the changes

rprkh and others added 2 commits April 24, 2023 22:21
Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
@rprkh
Copy link
Contributor Author

rprkh commented Apr 24, 2023

In a non-related topic, remember you can accept the changes directly from github. That makes the review process a bit easier :)

Yep, I included the changes using this. Its much better than using the command line :)

Copy link
Member

@ArturoAmorQ ArturoAmorQ left a comment

Choose a reason for hiding this comment

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

I think it may also be a good idea to display the roc_auc_score in each iteration. For this you will have to add a LogisticRegression step at the end of the pipeline.

rprkh and others added 4 commits April 26, 2023 18:54
Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
@rprkh
Copy link
Contributor Author

rprkh commented Apr 26, 2023

Added the ROC AUC scores.

@ArturoAmorQ
Copy link
Member

Added the ROC AUC scores.

Thanks! Now it look really good! Just a final comment on my side, can you please print the roc_auc_score up to the 3rd decimal?

@rprkh
Copy link
Contributor Author

rprkh commented Apr 26, 2023

Updated the ROC AUC scores to 3 decimal places.

Copy link
Member

@ArturoAmorQ ArturoAmorQ left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @rprkh!

@Micky774 Micky774 merged commit b6dd04e into scikit-learn:main Jul 26, 2023
@Micky774
Copy link
Contributor

Two standing approvals, plus it LGTM as well -- went ahead and merged. Thanks @rprkh @betatim, and@ArturoAmorQ for your work!

@rprkh rprkh deleted the doc_example_sfs_neg_tol branch July 27, 2023 04:23
punndcoder28 pushed a commit to punndcoder28/scikit-learn that referenced this pull request Jul 29, 2023
…learn#26205)

Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 18, 2023
…learn#26205)

Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
jeremiedbb pushed a commit that referenced this pull request Sep 20, 2023
Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…learn#26205)

Co-authored-by: Arturo Amor <86408019+ArturoAmorQ@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend SequentialFeatureSelector example to demonstrate how to use negative tol
4 participants