用 Python 透過機器學習預測 CTR
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() 與 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)recall_score(y_test, y_pred)fbeta_score(y_test, y_pred, beta = 0.5)roc_auc_score(y_test, y_score[:, 1])用 Python 透過機器學習預測 CTR