Skip to content

Remove deprecated multi_class argument in ALogitLasso#16

Open
FrenkT wants to merge 1 commit intogregbellan:stabl_lwfrom
FrenkT:remove-deprecated-multiclass
Open

Remove deprecated multi_class argument in ALogitLasso#16
FrenkT wants to merge 1 commit intogregbellan:stabl_lwfrom
FrenkT:remove-deprecated-multiclass

Conversation

@FrenkT
Copy link

@FrenkT FrenkT commented Oct 20, 2024

The multi_class argument was deprecated in scikit-learn 1.5, and specifying it now results in a warning message every time LogisticRegression is fit: FutureWarning: 'multi_class' was deprecated in version 1.5 and will be removed in 1.7. From then on, it will always use 'multinomial'. Leave it to its default value to avoid this warning..

@xavdurand
Copy link
Collaborator

Hello @FrenkT ,

Thank you for your pull request. You indeed raise a valid point for improving the library following the changes introduced in version 1.5 of the sklearn library.
Following this change, we also need to change the notebook examples. Indeed, in our process we used ALogitLasso in an ovr fashion. We will have to change the content of each notebook with sklearn.multiclass.OneVsRestClassifier(ALogitLasso(...)).
Secondly, to be consistent, we also need to add the modification to the main branch. I will do my best to resolve this issue as soon as possible.

As a quick, but not sustainable, solution, you can fix the version of sklearn in the setup.py file at version ~1.4:
"scikit-learn~=1.4".

@xavdurand xavdurand added the enhancement New feature or request label Oct 21, 2024
@FrenkT
Copy link
Author

FrenkT commented Oct 22, 2024

@xavdurand thank you for the input. I would be happy to take a look at the notebooks in the next few days.

@FrenkT
Copy link
Author

FrenkT commented Oct 26, 2024

Hi @xavdurand ,
I was looking at the example scripts and notebooks, and I could not find any instance where you actually use multi_class='ovr', so I think this should be fine? Or maybe I also missed something 😄

@xavdurand
Copy link
Collaborator

Hi @FrenkT ,

Thank you for looking at the argument. The modification that we need to perform is to change the base_estimator so it is in OVR mode. Indeed, in the paper, we run the examples with OVR models.

I hope it is clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants