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

推薦閱讀
- Microsoft SQL Server企業(yè)級(jí)平臺(tái)管理實(shí)踐
- Developing Mobile Games with Moai SDK
- 從0到1:數(shù)據(jù)分析師養(yǎng)成寶典
- 達(dá)夢(mèng)數(shù)據(jù)庫(kù)性能優(yōu)化
- 數(shù)據(jù)挖掘原理與SPSS Clementine應(yīng)用寶典
- 數(shù)據(jù)庫(kù)技術(shù)及應(yīng)用教程
- HikariCP連接池實(shí)戰(zhàn)
- Python數(shù)據(jù)分析與數(shù)據(jù)化運(yùn)營(yíng)
- 一本書(shū)講透Elasticsearch:原理、進(jìn)階與工程實(shí)踐
- Oracle數(shù)據(jù)庫(kù)管理、開(kāi)發(fā)與實(shí)踐
- openGauss數(shù)據(jù)庫(kù)核心技術(shù)
- 大數(shù)據(jù)時(shí)代系列(套裝9冊(cè))
- 算法設(shè)計(jì)與分析
- Scratch 2.0 Game Development HOTSHOT
- 企業(yè)級(jí)大數(shù)據(jù)項(xiàng)目實(shí)戰(zhàn):用戶搜索行為分析系統(tǒng)從0到1