[~] Refactor

This commit is contained in:
Siarhei Siniak 2021-07-15 09:59:41 +03:00
parent fb0f635ae1
commit 50ca593a1c

@ -242,13 +242,14 @@ def kernel_3(
# %% [code]
def roc_auc(predictions,target):
import sklearn.metrics
'''
This methods returns the AUC Score when given the Predictions
and Labels
'''
fpr, tpr, thresholds = metrics.roc_curve(target, predictions)
roc_auc = metrics.auc(fpr, tpr)
fpr, tpr, thresholds = sklearn.metrics.roc_curve(target, predictions)
roc_auc = sklearn.metrics.auc(fpr, tpr)
return roc_auc
# %% [code]