衡量最终模型性能
现在是时候计算您最终模型(逻辑回归)的测试集表现了。这里将使用保留的测试数据,来表征该模型在应用于新数据时的预期性能。
本练习是课程的一部分
Tidyverse 中的机器学习
练习说明
- 使用
table()比较向量test_actual与test_predicted。 - 计算测试集准确率(accuracy)。
- 计算测试集精确率(precision)。
- 计算测试集召回率(recall)。
- 完成本练习后,您就顺利结束本课程了!如果您喜欢本课程内容,欢迎在 Twitter 上向 Dmitriy 表示感谢,他一定会很高兴的。给 Dmitriy 发推文
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Compare the actual & predicted performance visually using a table
___
# Calculate the test accuracy
___
# Calculate the test precision
___
# Calculate the test recall
___