You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chance_level_kw in RocCurveDisplay raises an error when using valid matplotlib args #30015
When passing additional keyword arguments to the random classifier's line via the chance_level_kw argument, some arguments raise an error even though they are valid matplotlib.pyplot.plot() arguments. The error occurs with the c and ls arguments.
The reason is that in scikit-learn/sklearn/metrics/_plot/roc_curve.py, the following code exists:
Matplotlib raises an error when both color and c, or linestyle and ls are specified (this happens with other arguments too, but these are not relevant here since scikit-learn does not set values for them).
This behavior may also occur with other future classes, especially CapCurveDisplay (in development #28972).
Yep a separate PR would be nice. I think that we can solve the bug in the different display that we have thought. Not all will have such default style so we should have only a subset.
Activity
glemaitre commentedon Oct 7, 2024
Indeed this is a bug.
We should at least the support the alias for the default style meaning only. This should not make the code too much cumbersome.
JosephBARBIERDARNAL commentedon Oct 7, 2024
I am willing to open a PR for this, as well as correct the problem in #28972 . Is it preferable for this to be a separate PR?
glemaitre commentedon Oct 7, 2024
Yep a separate PR would be nice. I think that we can solve the bug in the different display that we have thought. Not all will have such default style so we should have only a subset.
@JosephBARBIERDARNAL Feel free to ping me in the PR for review.