用 Python 预测 CTR 的机器学习实战
Kevin Huo
Instructor

print(confusion_matrix(y_test, y_pred))
[[8163 166]
[1517 154]]
# 顺序:tn, fp, fn, tp
print(confusion_matrix(y_test, y_pred).ravel())
[8163, 166, 1517, 154]
c 与回报 rtotal_return = tp * r
total_cost = (tp + fp) * c
tp * r > (tp + fp) * c
roi = total_return / total_spent
用 Python 预测 CTR 的机器学习实战