Adattare, aumentare e valutare
Sei pronto a adattare il workflow ai dati di training e a valutarne le prestazioni usando la suddivisione di testing.
Il pacchetto embed, l'oggetto lr_workflow_glm e le corrispondenti suddivisioni test e train sono già nel tuo workspace.
Questo esercizio fa parte del corso
Feature Engineering in R
Istruzioni dell'esercizio
- Adatta il workflow al training set.
- Aumenta il fit usando la suddivisione di test.
- Valuta il modello.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Fit the workflow to the training set
lr_fit_glm <- lr_workflow_glm %>%
___(train)
# Augment the fit using the test split
lr_aug_glm <- lr_fit_glm %>%
___(test)
# Assess the model
glm_metrics <- lr_aug_glm %>%
class_evaluate(truth = ___,
estimate = .pred_class,
.pred_Yes)
glm_metrics