Skip to content

Instantly share code, notes, and snippets.

@rohan-paul
Created October 22, 2021 21:35
Show Gist options
  • Save rohan-paul/7dac73a65f7c1c0cef9fb45b60c16ea3 to your computer and use it in GitHub Desktop.
Save rohan-paul/7dac73a65f7c1c0cef9fb45b60c16ea3 to your computer and use it in GitHub Desktop.
import numpy as np
from sklearn.metrics import roc_auc_score
from sklearn.metrics import roc_curve, auc
import matplotlib.pyplot as plt
#generating synthetic data
number_of_classes = 5
samples_per_class= 70
labels = np.concatenate([[i]*samples_per_class for i in range(number_of_classes)])
print(labels)
predictions = np.stack([np.random.uniform(0,1,samples_per_class*number_of_classes) for _ in range(number_of_classes)]).T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment