Prédire le CTR avec le Machine Learning en Python
Kevin Huo
Instructor
TP / (TP + FP)TP / (TP + FN)print(precision_score(
y_test, y_pred, average = 'weighted'))
0.73
print(recall_score(
y_test, y_pred, average = 'weighted'))
0.75
y_pred = np.asarray([0 for x in range(len(X_test))])
[[0]
[0] ...]
tp et fp seront à zéroconfusion_matrix() et ravel() pour obtenir les quatre catégories d'issuestotal_return = tp * r
total_spent = (tp + fp) * cost
roi = total_return / total_spent
Prédire le CTR avec le Machine Learning en Python