6 machine learning system design

| 分类 course  | 标签 ml 

Error analysis

Recommended approch

  • Start with a simple algorithm that you can implement quickly
  • Plot learning curves to decide if more data, more features, etc. are likely to help
  • Error analysis: Manually examine the examples(in cross validataion set) that your algorithm made errors on. See if you spot any systematic trend in what type of examples it is making errors on.

Error metrics for skewed classes

Precision/Recall

precision_recall.png

用slide上的例子解释上面的图

  • Precision: 在我们所预测的y=1的病人中,有多少是真的得了癌症
  • Recall:在所有的有癌症的病人当中,有多少被正确预测到了。

Trading off precision and recall

Logistic regression:

Prediect 1 if threshold

  • Suppose we want to predict y = 1(cancer) only if very confident. Higher precision, lower recall. 可以让threshold大点
  • Suppose we want to avoid missing too many cases of cancer(avoid false negative) { Higher recall, lower precision} 可以让threshold小点

上一篇     下一篇