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

Performance of a single model

Now that you have the binary vectors for the actual and predicted values of the model, you can calculate many commonly used binary classification metrics. In this exercise you will focus on:

  • accuracy: rate of correctly predicted values relative to all predictions.
  • precision: portion of predictions that the model correctly predicted as TRUE.
  • recall: portion of actual TRUE values that the model correctly recovered.

Bu egzersiz

Machine Learning in the Tidyverse

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

Egzersiz talimatları

  • Use table() to compare the validate_actual and validate_predicted values for the example model and validate data frame.
  • Calculate the accuracy.
  • Calculate the precision.
  • Calculate the recall.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

library(Metrics)

# Compare the actual & predicted performance visually using a table
table(___, ___)

# Calculate the accuracy
accuracy(___, ___)

# Calculate the precision
precision(___, ___)

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