Prevedere il CTR con il Machine Learning in Python
Kevin Huo
Instructor

C è l’inverso dell’intensità della regolarizzazione.C=0.05 < C=0.5 < C=1max_depth controlla quanta profondità può raggiungere l’albero.max_depth=3 < max_depth=5 < max_depth=10
k fold, quella fold è il set di test (per validazione) e le altre k-1 sono di training.k valutazioni delle performance del modello.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_aucPrevedere il CTR con il Machine Learning in Python