Prevendo CTR com Machine Learning em Python
Kevin Huo
Instructor

C é o inverso da força de regularização.C=0.05 < C=0.5 < C=1max_depth limita quantos níveis a árvore pode ter.max_depth=3 < max_depth=5 < max_depth=10
k folds, ele é usado como teste (validação) e os outros k-1 como treino.k avaliações do desempenho do modelo.k_fold = KFold(n_splits = 4, random_state = 0, shuffle = True)
for i in [3, 5, 10]:
clf = DecisionTreeClassifier(max_depth = i)
cv_precision = cross_val_score(
clf, X_train, y_train, cv = k_fold,
scoring = 'precision_weighted')
precision_weighted, recall_weighted, roc_aucPrevendo CTR com Machine Learning em Python