[Python] sklearn: multi-class problem and reporting sensitivity and specificity

Discussão em 'Python' iniciado por Stack, Novembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    I have a three-class problem and I'm able to report precision and recall for each class with the below code:

    from sklearn.metrics import classification_report
    print(classification_report(y_test, y_pred))


    which gives me the precision and recall nicely for each of the 3 classes in a table format.

    My question is how can I now get sensitivity and specificity for each of the 3 classes? I looked at sklearn.metrics and I didn't find anything for reporting sensitivity and specificity.

    Continue reading...

Compartilhe esta Página