Predicting CTR with Machine Learning in Python
Kevin Huo
Instructor

clf = LogisticRegression()fit() method which takes in an X_train, y_train: clf.fit(X_train, y_train)X_train is the vector of training features, y_train is the vector of training targetspredict() method which takes in an X_test to generate a y_test as follows:array([0, 1, 1, ..., 1, 0, 1])
predict_proba() method produces probability scoresarray([0.2, 0.8], [0.4, 0.6] ..., [0.1, 0.9] [0.3, 0.7]])
accuracy_score(y_test, y_pred)Predicting CTR with Machine Learning in Python