用 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 的机器学习实战