ComeçarComece de graça

Are you predicting correctly?

Your model should be as good as possible, right? One way you can assess this is by counting how often it predicted the correct classes compared to the total number of predictions it made. As discussed in the video, we call this performance measure accuracy. You can either calculate this manually or by using a handy shortcut. Both obtain the same result.

The confusion matrix diabetes_matrix and the tibble predictions_combined are loaded.

Este exercício faz parte do curso

Machine Learning with Tree-Based Models in R

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Calculate the number of correctly predicted classes
correct_predictions <- 75 + ___

# Calculate the number of all predicted classes
all_predictions <- ___ + ___ + 18 + ___

# Calculate and print the accuracy
acc_manual <- ___ / ___
___
Editar e executar o código