- Hands-On Machine Learning with Microsoft Excel 2019
- Julio Cesar Rodriguez Martino
- 173字
- 2021-06-24 15:10:59
Building the confusion matrix
Let's now think about a binary classification problem. We have a set of samples belonging to two classes: YES or NO. We can build a machine learning model that outputs a class for each input set of variables. By testing our model on 200 samples, we will get the following results:

There are four elements to the confusion matrix:
- True positives (TP): The number of times that the model predicts YES and the actual value is YES. In our example, this is 100 times.
- True negatives (TN): The number of times that the model predicts NO and the actual value is NO. In our example, this is 60 times.
- False positives (FP): The number of times that the model predicts YES and the actual value is NO. In our example, this is 15 times.
- False negatives (FN): The number of times that the model predicts NO and the actual value is YES. In this example, this is 25 times.
Then, we calculate the confusion matrix in the following equation:

推薦閱讀
- MySQL高可用解決方案:從主從復(fù)制到InnoDB Cluster架構(gòu)
- 我們都是數(shù)據(jù)控:用大數(shù)據(jù)改變商業(yè)、生活和思維方式
- 使用GitOps實(shí)現(xiàn)Kubernetes的持續(xù)部署:模式、流程及工具
- Python金融大數(shù)據(jù)分析(第2版)
- 商業(yè)分析思維與實(shí)踐:用數(shù)據(jù)分析解決商業(yè)問題
- 深入淺出MySQL:數(shù)據(jù)庫(kù)開發(fā)、優(yōu)化與管理維護(hù)(第2版)
- 云數(shù)據(jù)中心網(wǎng)絡(luò)與SDN:技術(shù)架構(gòu)與實(shí)現(xiàn)
- INSTANT Apple iBooks How-to
- 探索新型智庫(kù)發(fā)展之路:藍(lán)迪國(guó)際智庫(kù)報(bào)告·2015(上冊(cè))
- Solaris操作系統(tǒng)原理實(shí)驗(yàn)教程
- Mastering ROS for Robotics Programming(Second Edition)
- Node.js High Performance
- MySQL數(shù)據(jù)庫(kù)應(yīng)用與管理
- 數(shù)據(jù)挖掘與機(jī)器學(xué)習(xí)-WEKA應(yīng)用技術(shù)與實(shí)踐(第二版)
- Oracle 11g數(shù)據(jù)庫(kù)管理員指南