Last active
March 29, 2021 15:30
-
-
Save git-commit/66bd61d1e15273808366d568bf51f0a4 to your computer and use it in GitHub Desktop.
roc evaluation multiclass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def roc(true_class, predicted_score): | |
| print(f"roc_macro_ovr={sklearn.metrics.roc_auc_score(true_class, predicted_score, average='macro', multi_class='ovr')}") | |
| print(f"roc_macro_ovo={sklearn.metrics.roc_auc_score(true_class, predicted_score, average='macro', multi_class='ovo')}") | |
| print(f"roc_weighted_ovr={sklearn.metrics.roc_auc_score(true_class, predicted_score, average='weighted', multi_class='ovr')}") | |
| print(f"roc_weighted_ovo={sklearn.metrics.roc_auc_score(true_class, predicted_score, average='weighted', multi_class='ovo')}") | |
| roc(true_class, self.model.predict(self.x_val)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment