Skip to content
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

[ENH]: start refactoring pipelines module #14

Merged
merged 20 commits into from
Apr 30, 2021
Merged

[ENH]: start refactoring pipelines module #14

merged 20 commits into from
Apr 30, 2021

Conversation

dengemann
Copy link
Collaborator

Do not merge.
This is still broken but you can see already a bit where it's going.
Addresses multiple issues.

@dengemann
Copy link
Collaborator Author

I am still having some difficulty debugging the test_pipelines.py @DavidSabbagh @agramfort
I absolutely want things to be indexible by column names, not integer indices.
The ExpandFeatures class must be probably updated to return a DatafFrame.
The code inside ExpandFeatures is the problem, all passes when not expanding interaction effects.
As it is in this PR, scikit-learn complains becaus –– I guess –– it cannot drop the indicator colum based on a name, as ExpanFeagures returns an array, not a DataFrame.
Will push/investigate more tomorrow.

@DavidSabbagh
Copy link
Collaborator

DavidSabbagh commented Apr 24, 2021 via email

@dengemann
Copy link
Collaborator Author

I think we have to make clear design choices here and require that the code here only supports DataFrames all the way down. It will simplify things; working on a fix in the meantime.

@dengemann dengemann changed the title [WIP]: start refactoring pipelines module [ENH]: start refactoring pipelines module Apr 27, 2021
@dengemann
Copy link
Collaborator Author

@agramfort @DavidSabbagh there is more to be done (especially tests) but I think this is already something. If we can do the necessary to merge this, I think, we make a step ahead.

estimator : scikit-learn Estimator object.
The estimator object. Defaults to None. If None, RidgeCV is used with
generalized cross validation for the regularization parameter alpha.
A logarithmic space between -3 and 5 is visited (100 values).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering if we should not make 3 functions

make_filter_bank_transformer
make_filter_bank_regressor
make_filter_bank_classifier

where make_filter_bank_transformer returns the first steps of the pipeline without the scaler and the RIdgeCV

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking in that direction too. make_filter_bank_regressor/classifier would then just be high-level convenience functions that work API-wise like the current make_filter_bank_model?

dengemann and others added 3 commits April 28, 2021 10:17
Co-authored-by: Alexandre Gramfort <[email protected]>
Co-authored-by: Alexandre Gramfort <[email protected]>
Co-authored-by: Alexandre Gramfort <[email protected]>
@agramfort
Copy link
Collaborator

agramfort commented Apr 28, 2021 via email

@dengemann
Copy link
Collaborator Author

@agramfort next milestone unlocked :)

Copy link
Collaborator

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

besides LGTM

dengemann and others added 2 commits April 29, 2021 11:56
Co-authored-by: Alexandre Gramfort <[email protected]>
Co-authored-by: Alexandre Gramfort <[email protected]>
Copy link
Collaborator

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

@dengemann merge if happy

@dengemann dengemann merged commit 1dbbee2 into coffeine-labs:main Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants