BaşlayınÜcretsiz Başlayın

Create reduced random forest

Now, it's time to fit a reduced model using train_reduced and evaluate it using test_reduced. rf_spec is available for you to fit the reduced model. The full model had an F1 value of 0.948. As you fit and evaluate a reduced model, keep in mind there is always a trade-off between model simplicity and model performance. You have to make a judgment call about whether the benefits of the model reduction are worth any decrease in model performance, if there is any.

The tidyverse, tidymodels, and vip packages have been loaded for you.

Bu egzersiz

Dimensionality Reduction in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Use the rf_spec to fit the reduced random forest model.
  • Bind the reduced model predictions to test_reduced.
  • Calculate the F1 metric for the reduced model.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Fit a reduced model
rf_reduced_fit <- ___ %>% 
  ___(___, ___ = ___)

# Create test set prediction data frame
predict_reduced_df <- ___ %>% 
  ___(predict = ___(___, ___))

# Calculate F1 performance
___(___, ___, ___)
Kodu Düzenle ve Çalıştır