Predicting CTR with Machine Learning in Python
Kevin Huo
Instructor
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.neural_network import MLPClassifier
classifier.fit(X_train, y_train)predict_proba() and predict()max_depth, min_samples_splitn_estimators, oob_scorefit_intercept, class_weighthidden_layer_sizes, max_iterconfusion_matrix(y_test, y_pred)precision_score(y_test, y_pred)precision_score(y_test, y_pred)fbeta_score(y_test, y_pred, beta = 0.5)roc_auc_score(y_test, y_score[:, 1])Predicting CTR with Machine Learning in Python