Commit 8e0361fd authored by Imanol Perez's avatar Imanol Perez
Browse files

Upload project

parent b4b1bc14
......@@ -8,15 +8,15 @@ def evaluate(classifier, features, Y):
print("Evaluating performance...")
predictions = classifier.predict_proba(features)[:, 1]
roc = roc_auc_score(Y, predictions)
print("ROC of predictions: %s"%roc)
#predictions = classifier.predict_proba(features)[:, 1]
#roc = roc_auc_score(Y, predictions)
#print("ROC of predictions: %s"%roc)
#predictions = classifier.predict(features)
#cm = confusion_matrix(Y, predictions)
predictions = classifier.predict(features)
cm = confusion_matrix(Y, predictions)
#Se = cm[1, 1] / float(cm[1, 0] + cm[1, 0])
#P = cm[1, 1] / float(cm[1, 0] + cm[0, 1])
#score = min(Se, P)
Se = cm[1, 1] / float(cm[1, 1] + cm[1, 0])
P = cm[1, 1] / float(cm[1, 1] + cm[0, 1])
score = min(Se, P)
#print("Score of predictions: %s"%score)
print("Score of predictions: %s"%score)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment