[~] Refactor
This commit is contained in:
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]
|
||||
|
Loading…
Reference in New Issue
Block a user