開始使用免費開始

衡量最終模型的效能

現在該來計算你最終模型(邏輯斯迴歸)的測試效能了。你會使用保留出的測試資料,來描述當這個模型套用到新資料時,你可以預期的表現。

本練習屬於課程

Tidyverse 的 Machine Learning

檢視課程

練習說明

  • 使用 table() 比較 test_actualtest_predicted 向量。
  • 計算測試集的 accuracy(正確率)。
  • 計算測試集的 precision(精確率)。
  • 計算測試集的 recall(召回率)。
  • 完成這個練習後,你就結束本課程了!如果你喜歡這門課,歡迎在 Twitter 上向 Dmitriy 表示感謝。他一定會很開心。 Tweet to Dmitriy

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

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

# Calculate the test accuracy
___

# Calculate the test precision
___

# Calculate the test recall
___
編輯並執行程式碼