Warning resolve convergence warning by reducing the default penalty#14143
Warning resolve convergence warning by reducing the default penalty#14143NicolasHug merged 6 commits intoscikit-learn:masterfrom
Conversation
|
Please also say something like (related to #14117), when working on the issue :) |
|
two points which may be useful:
|
|
Could you also paste the output of the example before and after the change? |
|
thanks, the output looks good, could you also say how long it takes to run before and after the change? |
Before, the example took 20.4s to run. Thanks Adrin for your views! |
adrinjalali
left a comment
There was a problem hiding this comment.
Awesome, LGTM, thanks @rwaithera :)
|
On master the example output was: The best_index_ is 2
The n_components selected is 6
The corresponding accuracy score is 0.80The docstring says:
|
|
Please try n_components=7 and see if the docstring is respected? |
|
If it is fine with everyone, I propose the following: It leads to the following figure and we can update the description accordingly. It enforces what is discuss in the description of the example. @rwaithera can you update the example or to you want me to quickly address those and merge your PR? |
I get the following after adding 7 into the reduce_dim__n_components list: The best_index_ is 3 |
That increases the accuracy. Nice @adrinjalali . I will update the cahnges. |
|
The important message here is that |
Ah! I see now. It is all clear what everyone meant by within 1 std from the best accuracy score. Thanks @glemaitre! |
|
@rwaithera @adrinjalali cc: @Mariam-ke |
|
I think there are still changes which need to be applied by @rwaithera , and then @glemaitre can accept the PR |
|
@Mariam-ke
As an FYI: there are sprints going on in Austin, TX this weekend, and then the NYC sprint coming up in August, so this can go to someone else. Thanks. |
|
Marking this available for the Austin sprint (hope that's OK. I think the 14 days rule is too strict when there are upcoming sprints). As far as I can tell all this PR needs is to update the docstring description above |
|
@NicolasHug That is fine. Would be good to see this completed. |
|
Hi folks, I'm working on this issue. |
@reshamas I submitted the suggestion @glemaitre gave. Please @glemaitre , review the changes. Thanks! |
|
@rwaithera the docstring at the beginning of the example needs an update to be consistent with the current changes (see the changes proposed in #14329 by @wendyhhu). Would you be able to submit them soon? Thanks! |
@NicolasHug I see the changes were updated in the documentation. |
|
@rwaithera, what I mean is that we need you to apply the same changes as in #14329 for your PR to get merged. |
I have applied the changes @NicolasHug |
|
|
||
| The figure shows the trade-off between cross-validated score and the number | ||
| of PCA components. The balanced case is when n_components=6 and accuracy=0.80, | ||
| of PCA components. The balanced case is when n_components=12 and accuracy=0.90, |
There was a problem hiding this comment.
@rwaithera thanks, we're almost there. Just need to update the numbers:
| of PCA components. The balanced case is when n_components=12 and accuracy=0.90, | |
| of PCA components. The balanced case is when n_components=10 and accuracy=0.88, |
|
@rwaithera some final changes you need to make, should be then ready for a merge :) |
NicolasHug
left a comment
There was a problem hiding this comment.
Thank you for your work @rwaithera
Thank you for your guidance @NicolasHug |



Added a lower penalty to LinearSVC(). Made C=0.01 instead of the default 1. This resolves the Convergence Warning.
#WiMLDS_Nairobi
@Darthvaderkenya