Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gakuba
gakuba / metrics.py
Last active July 16, 2018 23:32
module to display roc_au of multilabel classifier
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import roc_curve, auc
from scipy import interp
from itertools import cycle
def roc_auc(y_test, y_score, n_classes):
"""Plots ROC curve for micro and macro averaging."""
# Compute ROC curve and ROC area for each class
@gakuba
gakuba / MultiLabelClassification-with-nltk.ipynb
Last active April 1, 2020 16:11
In this Tutorial, I explain how to do Multi label classification of texts using nltk
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.