การพยากรณ์ CTR ด้วย Machine Learning ใน Python
Kevin Huo
Instructor

clf = LogisticRegression()fit() ที่รับ X_train, y_train: clf.fit(X_train, y_train)X_train คือเวกเตอร์ของ feature สำหรับเทรน, y_train คือเวกเตอร์ของ target สำหรับเทรนpredict() ที่รับ X_test เพื่อสร้าง y_test ดังนี้:array([0, 1, 1, ..., 1, 0, 1])
predict_proba() ให้คะแนนความน่าจะเป็นarray([0.2, 0.8], [0.4, 0.6] ..., [0.1, 0.9] [0.3, 0.7]])
accuracy_score(y_test, y_pred)การพยากรณ์ CTR ด้วย Machine Learning ใน Python