mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 20:15:21 +00:00
ensemble bug
This commit is contained in:
parent
527a427443
commit
4500e32fbe
@ -45,6 +45,8 @@ for key, values in idendities.items():
|
|||||||
positives = pd.DataFrame(positives, columns = ["file_x", "file_y"])
|
positives = pd.DataFrame(positives, columns = ["file_x", "file_y"])
|
||||||
positives["decision"] = "Yes"
|
positives["decision"] = "Yes"
|
||||||
|
|
||||||
|
positives = positives.sample(12)
|
||||||
|
|
||||||
print(positives.shape)
|
print(positives.shape)
|
||||||
#--------------------------
|
#--------------------------
|
||||||
#Negatives
|
#Negatives
|
||||||
@ -206,17 +208,13 @@ gbm.save_model("face-recognition-ensemble-model.txt")
|
|||||||
#--------------------------
|
#--------------------------
|
||||||
#Evaluation
|
#Evaluation
|
||||||
|
|
||||||
prediction_classes = gbm.predict(x_test)
|
predictions = gbm.predict(x_test)
|
||||||
|
|
||||||
prediction_classes = []
|
prediction_classes = []
|
||||||
for prediction in predictions:
|
for prediction in predictions:
|
||||||
prediction_class = np.argmax(prediction)
|
prediction_class = np.argmax(prediction)
|
||||||
prediction_classes.append(prediction_class)
|
prediction_classes.append(prediction_class)
|
||||||
|
|
||||||
print(y_test)
|
|
||||||
print("------")
|
|
||||||
print(prediction_classes)
|
|
||||||
|
|
||||||
cm = confusion_matrix(y_test, prediction_classes)
|
cm = confusion_matrix(y_test, prediction_classes)
|
||||||
print(cm)
|
print(cm)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user