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

Regarding the scikit-plot.metrics.plot_roc function #115

Open
Akshay1-6180 opened this issue Jul 23, 2021 · 1 comment
Open

Regarding the scikit-plot.metrics.plot_roc function #115

Akshay1-6180 opened this issue Jul 23, 2021 · 1 comment

Comments

@Akshay1-6180
Copy link

In you code I noticed that if we pass classes in the form of their actual meaning instead of (0,1,2 .. ) and we pass it as (c,b,a) then np.unique(y_true) makes the classes in the form of its alphabetical format and this changes the position of the classes that the model was trained on
classes = np.unique(y_true)

fpr_dict[i], tpr_dict[i], _ = roc_curve(y_true, probas[:, i], pos_label=classes[i])

Hence if you could add a parameter of class_labels in the function

def plot_roc_multi(y_true, y_probas,class_labels, title='ROC Curves', plot_micro=True, plot_macro=True, classes_to_plot=None, ax=None, figsize=None, cmap='nipy_spectral', title_fontsize="large", text_fontsize="medium"):

where class_labels is in the form of an array [a,b,c] it would be much easier I think

@angerhang
Copy link

Yeah I also had a similar request that it would be good to allow us to specify the class label directly as a parameter where the class label is jut an array.

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

No branches or pull requests

2 participants