- 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:

推薦閱讀
- 同步:秩序如何從混沌中涌現(xiàn)
- Access 2007數(shù)據(jù)庫應(yīng)用上機(jī)指導(dǎo)與練習(xí)
- Python廣告數(shù)據(jù)挖掘與分析實(shí)戰(zhàn)
- MySQL從入門到精通(第3版)
- 大數(shù)據(jù)算法
- 醫(yī)療大數(shù)據(jù)挖掘與可視化
- 算法與數(shù)據(jù)中臺(tái):基于Google、Facebook與微博實(shí)踐
- 大數(shù)據(jù)技術(shù)入門
- 一本書講透Elasticsearch:原理、進(jìn)階與工程實(shí)踐
- 區(qū)域云計(jì)算和大數(shù)據(jù)產(chǎn)業(yè)發(fā)展:浙江樣板
- 實(shí)現(xiàn)領(lǐng)域驅(qū)動(dòng)設(shè)計(jì)
- Spring Boot 2.0 Cookbook(Second Edition)
- Oracle 11g數(shù)據(jù)庫管理員指南
- 數(shù)據(jù)庫原理及應(yīng)用:SQL Server 2016
- Python金融數(shù)據(jù)挖掘與分析實(shí)戰(zhàn)