为模型构建 ROC 曲线(R 语言实现)。
Build an ROC curve for the model built.
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: medium
分类: 模型评估, ROC
标签: R, ROCR, ROC curve
参考答案摘要
核心答案 使用 ROCR 包可以构建 ROC 曲线: library(ROCR) prediction(pred_heart, test$target)-> roc_pred_heart performance(roc_pred_heart, "tpr", "fpr")->roc_curve plot(roc_curve, colorize=T)
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。