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.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Dimensionality Reduction in R
अभ्यास निर्देश
- Use
f_measto 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_measto evaluate the performance of the reducedumap_dt_fit.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# 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
___(___, ___, ___)