Evaluate the UMAP decision tree model
In the previous exercise, you created a workflow to apply UMAP and build a decision tree model. Now it's time to fit a model using that training data and compare its performance to the unreduced decision tree model. Because the target variable credit_score
is categorical, you will use f_meas()
to evaluate the models' performances. The unreduced model and its test predictions are stored in dt_fit
and predict_df
, respectively. The UMAP workflow you created is in umap_dt_workflow
. The train
and test
sets are also provided for you.
The tidyverse
, tidymodels
, and embed
packages have been loaded for you.
Diese Übung ist Teil des Kurses
Dimensionality Reduction in R
Anleitung zur Übung
- Use
f_meas
to evaluate the performance of the unreduceddt_fit
. - Fit the UMAP reduced model using
umap_dt_workflow
. - Create the test set prediction data frame for the reduced UMAP model.
- Use
f_meas
to evaluate the performance of the reducedumap_dt_fit
.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Evaluate the unreduced decision tree model performance
___(___, ___, ___)
# Fit the UMAP decision tree model
umap_dt_fit <- ___ %>%
fit(___ = ___)
# Create test set prediction data frame for the UMAP model
predict_umap_df <- ___ %>%
___(predict = ___(___, ___))
# Calculate F1 performance of the UMAP model
___(___, ___, ___)