You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgi29wjsp/_book/classification_metrics.html

965 lines
65 KiB

<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>分类性能评估指标 · GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-katex/katex.min.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="regression_metrics.html" />
<link rel="prev" href="metrics.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
简介
</a>
</li>
<li class="chapter " data-level="1.2" data-path="machine_learning.html">
<a href="machine_learning.html">
机器学习概述
</a>
</li>
<li class="chapter " data-level="1.3" data-path="algorithm.html">
<a href="algorithm.html">
常见机器学习算法
</a>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="kNN.html">
<a href="kNN.html">
近朱者赤近墨者黑-kNN
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="linear_regression.html">
<a href="linear_regression.html">
最简单的回归算法-线性回归
</a>
</li>
<li class="chapter " data-level="1.3.3" data-path="logistic_regression.html">
<a href="logistic_regression.html">
使用回归的思想进行分类-逻辑回归
</a>
</li>
<li class="chapter " data-level="1.3.4" data-path="decision_tree.html">
<a href="decision_tree.html">
最接近人类思维的算法-决策树
</a>
</li>
<li class="chapter " data-level="1.3.5" data-path="random_forest.html">
<a href="random_forest.html">
群众的力量是伟大的-随机森林
</a>
</li>
<li class="chapter " data-level="1.3.6" data-path="kMeans.html">
<a href="kMeans.html">
物以类聚人以群分-kMeans
</a>
</li>
<li class="chapter " data-level="1.3.7" data-path="AGNES.html">
<a href="AGNES.html">
以距离为尺-AGNES
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" data-path="metrics.html">
<a href="metrics.html">
模型评估指标
</a>
<ul class="articles">
<li class="chapter active" data-level="1.4.1" data-path="classification_metrics.html">
<a href="classification_metrics.html">
分类性能评估指标
</a>
</li>
<li class="chapter " data-level="1.4.2" data-path="regression_metrics.html">
<a href="regression_metrics.html">
回归性能评估指标
</a>
</li>
<li class="chapter " data-level="1.4.3" data-path="cluster_metrics.html">
<a href="cluster_metrics.html">
聚类性能评估指标
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" data-path="sklearn.html">
<a href="sklearn.html">
使用sklearn进行机器学习
</a>
</li>
<li class="chapter " data-level="1.6" >
<span>
综合实战案例
</span>
<ul class="articles">
<li class="chapter " data-level="1.6.1" >
<span>
泰坦尼克生还预测
</span>
<ul class="articles">
<li class="chapter " data-level="1.6.1.1" data-path="titanic/introduction.html">
<a href="titanic/introduction.html">
简介
</a>
</li>
<li class="chapter " data-level="1.6.1.2" data-path="titanic/EDA.html">
<a href="titanic/EDA.html">
探索性数据分析(EDA)
</a>
</li>
<li class="chapter " data-level="1.6.1.3" data-path="titanic/feature engerning.html">
<a href="titanic/feature engerning.html">
特征工程
</a>
</li>
<li class="chapter " data-level="1.6.1.4" data-path="titanic/fit and predict.html">
<a href="titanic/fit and predict.html">
构建模型进行预测
</a>
</li>
<li class="chapter " data-level="1.6.1.5" data-path="titanic/tuning.html">
<a href="titanic/tuning.html">
调参
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6.2" >
<span>
使用强化学习玩乒乓球游戏
</span>
<ul class="articles">
<li class="chapter " data-level="1.6.2.1" data-path="pingpong/what is reinforce learning.html">
<a href="pingpong/what is reinforce learning.html">
什么是强化学习
</a>
</li>
<li class="chapter " data-level="1.6.2.2" data-path="pingpong/Policy Gradient.html">
<a href="pingpong/Policy Gradient.html">
Policy Gradient原理
</a>
</li>
<li class="chapter " data-level="1.6.2.3" data-path="pingpong/coding.html">
<a href="pingpong/coding.html">
使用Policy Gradient玩乒乓球游戏
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="1.7" data-path="recommand.html">
<a href="recommand.html">
实训推荐
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >分类性能评估指标</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="&#x5206;&#x7C7B;&#x6A21;&#x578B;&#x6027;&#x80FD;&#x8BC4;&#x4F30;&#x6307;&#x6807;">&#x5206;&#x7C7B;&#x6A21;&#x578B;&#x6027;&#x80FD;&#x8BC4;&#x4F30;&#x6307;&#x6807;</h1>
<h2 id="&#x51C6;&#x786E;&#x5EA6;&#x7684;&#x7F3A;&#x9677;">&#x51C6;&#x786E;&#x5EA6;&#x7684;&#x7F3A;&#x9677;</h2>
<p>&#x51C6;&#x786E;&#x5EA6;&#x8FD9;&#x4E2A;&#x6982;&#x5FF5;&#x76F8;&#x4FE1;&#x5BF9;&#x4E8E;&#x5927;&#x5BB6;&#x6765;&#x8BF4;&#x80AF;&#x5B9A;&#x5E76;&#x4E0D;&#x964C;&#x751F;&#xFF0C;&#x5C31;&#x662F;&#x6B63;&#x786E;&#x7387;&#x3002;&#x4F8B;&#x5982;&#x6A21;&#x578B;&#x7684;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x4E0E;&#x6570;&#x636E;&#x771F;&#x5B9E;&#x7ED3;&#x679C;&#x5982;&#x4E0B;&#x8868;&#x6240;&#x793A;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x7F16;&#x53F7;</th>
<th>&#x9884;&#x6D4B;&#x7ED3;&#x679C;</th>
<th>&#x771F;&#x5B9E;&#x7ED3;&#x679C;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>5</td>
<td>2</td>
<td>3</td>
</tr>
</tbody>
</table>
<p>&#x5F88;&#x660E;&#x663E;&#xFF0C;&#x8FDE;&#x5C0F;&#x670B;&#x53CB;&#x90FD;&#x80FD;&#x7B97;&#x51FA;&#x6765;&#x8BE5;&#x6A21;&#x578B;&#x7684;&#x51C6;&#x786E;&#x5EA6;&#x4E3A; 3/5 &#x3002;</p>
<p>&#x90A3;&#x4E48;&#x51C6;&#x786E;&#x5BF9;&#x8D8A;&#x9AD8;&#x5C31;&#x80FD;&#x8BF4;&#x660E;&#x6A21;&#x578B;&#x7684;&#x5206;&#x7C7B;&#x6027;&#x80FD;&#x8D8A;&#x597D;&#x5417;&#xFF1F;&#x975E;&#x4E5F;&#xFF01;&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF0C;&#x73B0;&#x5728;&#x6211;&#x5F00;&#x53D1;&#x4E86;&#x4E00;&#x5957;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#xFF0C;&#x53EA;&#x8981;&#x8F93;&#x5165;&#x4F60;&#x7684;&#x4E00;&#x4E9B;&#x57FA;&#x672C;&#x5065;&#x5EB7;&#x4FE1;&#x606F;&#xFF0C;&#x5C31;&#x80FD;&#x9884;&#x6D4B;&#x51FA;&#x4F60;&#x73B0;&#x5728;&#x662F;&#x5426;&#x60A3;&#x6709;&#x764C;&#x75C7;&#xFF0C;&#x5E76;&#x4E14;&#x5206;&#x7C7B;&#x7684;&#x51C6;&#x786E;&#x5EA6;&#x4E3A; 0.999 &#x3002;&#x60A8;&#x8BA4;&#x4E3A;&#x8FD9;&#x6837;&#x7684;&#x7CFB;&#x7EDF;&#x7684;&#x9884;&#x6D4B;&#x6027;&#x80FD;&#x597D;&#x4E0D;&#x597D;&#x5462;&#xFF1F;</p>
<p>&#x60A8;&#x53EF;&#x80FD;&#x4F1A;&#x89C9;&#x5F97;&#xFF0C;&#x54C7;&#xFF0C;&#x8FD9;&#x4E48;&#x9AD8;&#x7684;&#x51C6;&#x786E;&#x5EA6;&#xFF01;&#x8FD9;&#x4E2A;&#x7CFB;&#x7EDF;&#x80AF;&#x5B9A;&#x5F88;&#x725B;&#x903C;&#xFF01;&#x4F46;&#x662F;&#x6211;&#x4EEC;&#x77E5;&#x9053;&#xFF0C;&#x4E00;&#x822C;&#x5E74;&#x8F7B;&#x4EBA;&#x60A3;&#x764C;&#x75C7;&#x7684;&#x6982;&#x7387;&#x975E;&#x5E38;&#x4F4E;&#xFF0C;&#x5047;&#x8BBE;&#x60A3;&#x764C;&#x75C7;&#x7684;&#x6982;&#x7387;&#x4E3A; 0.001 &#xFF0C;&#x90A3;&#x4E48;&#x5176;&#x5B9E;&#x6211;&#x8FD9;&#x4E2A;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x53EA;&#x8981;&#x4E00;&#x76F4;&#x8F93;&#x51FA;&#x60A8;&#x6CA1;&#x6709;&#x60A3;&#x764C;&#x75C7;&#xFF0C;&#x51C6;&#x786E;&#x5EA6;&#x4E5F;&#x53EF;&#x80FD;&#x80FD;&#x591F;&#x8FBE;&#x5230; 0.999 &#x3002;</p>
<p>&#x5047;&#x5982;&#x73B0;&#x5728;&#x6709;&#x4E00;&#x4E2A;&#x4EBA;&#x672C;&#x8EAB;&#x5DF2;&#x7ECF;&#x60A3;&#x6709;&#x764C;&#x75C7;&#xFF0C;&#x4F46;&#x662F;&#x4ED6;&#x81EA;&#x5DF1;&#x4E0D;&#x77E5;&#x9053;&#x81EA;&#x5DF1;&#x60A3;&#x6709;&#x764C;&#x75C7;&#x3002;&#x8FD9;&#x4E2A;&#x65F6;&#x5019;&#x7528;&#x6211;&#x7684;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x68C0;&#x6D4B;&#x53D1;&#x73B0;&#x4ED6;&#x6CA1;&#x6709;&#x5F97;&#x764C;&#x75C7;&#xFF0C;&#x90A3;&#x5F88;&#x663E;&#x7136;&#x6211;&#x8FD9;&#x4E2A;&#x7CFB;&#x7EDF;&#x5DF2;&#x7ECF;&#x628A;&#x4ED6;&#x7ED9;&#x5751;&#x4E86;&#xFF08;&#x803D;&#x8BEF;&#x4E86;&#x6CBB;&#x7597;&#xFF09;&#x3002;</p>
<p>&#x770B;&#x5230;&#x8FD9;&#x91CC;&#x60A8;&#x5E94;&#x8BE5;&#x5DF2;&#x7ECF;&#x4F53;&#x4F1A;&#x5230;&#x4E86;&#xFF0C;&#x4E00;&#x4E2A;&#x5206;&#x7C7B;&#x6A21;&#x578B;&#x5982;&#x679C;&#x5149;&#x770B;&#x51C6;&#x786E;&#x5EA6;&#x662F;&#x4E0D;&#x591F;&#x7684;&#xFF0C;&#x5C24;&#x5176;&#x662F;&#x5BF9;&#x8FD9;&#x79CD;&#x6837;&#x672C;<strong>&#x6781;&#x5EA6;&#x4E0D;&#x5E73;&#x8861;</strong>&#x7684;&#x60C5;&#x51B5;&#xFF08; 10000 &#x6761;&#x5065;&#x5EB7;&#x4FE1;&#x606F;&#x6570;&#x636E;&#x4E2D;&#xFF0C;&#x53EA;&#x6709; 1 &#x6761;&#x7684;&#x7C7B;&#x522B;&#x662F;&#x60A3;&#x6709;&#x764C;&#x75C7;&#xFF0C;&#x5176;&#x4ED6;&#x7684;&#x7C7B;&#x522B;&#x90FD;&#x662F;&#x5065;&#x5EB7;&#xFF09;&#x3002;</p>
<h2 id="&#x6DF7;&#x6DC6;&#x77E9;&#x9635;">&#x6DF7;&#x6DC6;&#x77E9;&#x9635;</h2>
<p>&#x60F3;&#x8FDB;&#x4E00;&#x6B65;&#x7684;&#x8003;&#x91CF;&#x5206;&#x7C7B;&#x6A21;&#x578B;&#x7684;&#x6027;&#x80FD;&#x5982;&#x4F55;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x5176;&#x4ED6;&#x7684;&#x4E00;&#x4E9B;&#x6027;&#x80FD;&#x6307;&#x6807;&#xFF0C;&#x4F8B;&#x5982;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x3002;&#x4F46;&#x8FD9;&#x4E9B;&#x6307;&#x6807;&#x8BA1;&#x7B97;&#x7684;&#x57FA;&#x7840;&#x662F;<strong>&#x6DF7;&#x6DC6;&#x77E9;&#x9635;</strong>&#x3002;</p>
<p>&#x7EE7;&#x7EED;&#x4EE5;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x4E3A;&#x4F8B;&#xFF0C;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x7684;&#x8F93;&#x51FA;&#x4E0D;&#x662F;&#x6709;&#x764C;&#x75C7;&#x5C31;&#x662F;&#x5065;&#x5EB7;&#xFF0C;&#x8FD9;&#x91CC;&#x4E3A;&#x4E86;&#x65B9;&#x4FBF;&#xFF0C;&#x5C31;&#x7528; 1 &#x8868;&#x793A;&#x60A3;&#x6709;&#x764C;&#x75C7;&#xFF0C; 0 &#x8868;&#x793A;&#x5065;&#x5EB7;&#x3002;&#x5047;&#x8BBE;&#x73B0;&#x5728;&#x62FF; 10000 &#x6761;&#x6570;&#x636E;&#x6765;&#x8FDB;&#x884C;&#x6D4B;&#x8BD5;&#xFF0C;&#x5176;&#x4E2D;&#x6709; 9978 &#x6761;&#x6570;&#x636E;&#x7684;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; 0 &#xFF0C;&#x7CFB;&#x7EDF;&#x9884;&#x6D4B;&#x7684;&#x7C7B;&#x522B;&#x4E5F;&#x662F; 0 &#xFF0C;&#x6709; 2 &#x6761;&#x6570;&#x636E;&#x7684;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; 1 &#x5374;&#x9884;&#x6D4B;&#x6210;&#x4E86; 0 &#xFF0C;&#x6709; 12 &#x6761;&#x6570;&#x636E;&#x7684;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; 0 &#x4F46;&#x9884;&#x6D4B;&#x6210;&#x4E86; 1 &#xFF0C;&#x6709; 8 &#x6761;&#x6570;&#x636E;&#x7684;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; 1 &#xFF0C;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x4E5F;&#x662F; 1 &#x3002;</p>
<p>&#x5982;&#x679C;&#x6211;&#x4EEC;&#x628A;&#x8FD9;&#x4E9B;&#x7ED3;&#x679C;&#x7EC4;&#x6210;&#x5982;&#x4E0B;&#x77E9;&#x9635;&#xFF0C;&#x5219;&#x8BE5;&#x77E9;&#x9635;&#x5C31;&#x6210;&#x4E3A;<strong>&#x6DF7;&#x6DC6;&#x77E9;&#x9635;</strong>&#x3002;</p>
<table>
<thead>
<tr>
<th>&#x771F;&#x5B9E;\&#x9884;&#x6D4B;</th>
<th>0</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>9978</td>
<td>12</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>8</td>
</tr>
</tbody>
</table>
<p>&#x6DF7;&#x6DC6;&#x77E9;&#x9635;&#x4E2D;&#x6BCF;&#x4E2A;&#x683C;&#x5B50;&#x6240;&#x4EE3;&#x8868;&#x7684;&#x7684;&#x610F;&#x4E49;&#x4E5F;&#x5F88;&#x660E;&#x663E;&#xFF0C;&#x610F;&#x4E49;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x771F;&#x5B9E;\&#x9884;&#x6D4B;</th>
<th>0</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>&#x9884;&#x6D4B; 0 &#x6B63;&#x786E;&#x7684;&#x6570;&#x91CF;</td>
<td>&#x9884;&#x6D4B; 1 &#x9519;&#x8BEF;&#x7684;&#x6570;&#x91CF;</td>
</tr>
<tr>
<td>1</td>
<td>&#x9884;&#x6D4B; 0 &#x9519;&#x8BEF;&#x7684;&#x6570;&#x91CF;</td>
<td>&#x9884;&#x6D4B; 1 &#x6B63;&#x786E;&#x7684;&#x6570;&#x91CF;</td>
</tr>
</tbody>
</table>
<p>&#x5982;&#x679C;&#x5C06;&#x6B63;&#x786E;&#x770B;&#x6210;&#x662F; True &#xFF0C;&#x9519;&#x8BEF;&#x770B;&#x6210;&#x662F; False &#xFF0C; 0 &#x770B;&#x6210;&#x662F; Negtive &#xFF0C; 1 &#x770B;&#x6210;&#x662F; Positive &#x3002;&#x7136;&#x540E;&#x5C06;&#x4E0A;&#x8868;&#x4E2D;&#x7684;&#x6587;&#x5B57;&#x66FF;&#x6362;&#x6389;&#xFF0C;&#x6DF7;&#x6DC6;&#x77E9;&#x9635;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x771F;&#x5B9E;\&#x9884;&#x6D4B;</th>
<th>0</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>TN</td>
<td>FP</td>
</tr>
<tr>
<td>1</td>
<td>FN</td>
<td>TP</td>
</tr>
</tbody>
</table>
<p>&#x56E0;&#x6B64; TN &#x8868;&#x793A;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; Negtive &#xFF0C;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x4E5F;&#x662F; Negtive &#x7684;&#x6570;&#x91CF;&#xFF1B; FP &#x8868;&#x793A;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; Negtive &#xFF0C;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x662F; Positive &#x7684;&#x6570;&#x91CF;&#xFF1B; FN &#x8868;&#x793A;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; Positive &#xFF0C;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x662F;Negtive &#x7684;&#x6570;&#x91CF;&#xFF1B; TP &#x8868;&#x793A;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x662F; Positive &#xFF0C;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x4E5F;&#x662F; Positive &#x7684;&#x6570;&#x91CF;&#x3002;</p>
<p>&#x5F88;&#x660E;&#x663E;&#xFF0C;&#x5F53; FN &#x548C; FP &#x90FD;&#x7B49;&#x4E8E; 0 &#x65F6;&#xFF0C;&#x6A21;&#x578B;&#x7684;&#x6027;&#x80FD;&#x5E94;&#x8BE5;&#x662F;&#x6700;&#x597D;&#x7684;&#xFF0C;&#x56E0;&#x4E3A;&#x6A21;&#x578B;&#x5E76;&#x6CA1;&#x6709;&#x5728;&#x9884;&#x6D4B;&#x7684;&#x65F6;&#x5019;&#x72AF;&#x9519;&#x8BEF;&#x3002;&#x5373;&#x5982;&#x4E0B;&#x6DF7;&#x6DC6;&#x77E9;&#x9635;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x771F;&#x5B9E;\&#x9884;&#x6D4B;</th>
<th>0</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>9978</td>
<td>0</td>
</tr>
<tr>
<td>1</td>
<td>0</td>
<td>22</td>
</tr>
</tbody>
</table>
<p><strong>&#x6240;&#x4EE5;&#x6A21;&#x578B;&#x5206;&#x7C7B;&#x6027;&#x80FD;&#x8D8A;&#x597D;&#xFF0C;&#x6DF7;&#x6DC6;&#x77E9;&#x9635;&#x4E2D;&#x975E;&#x5BF9;&#x89D2;&#x7EBF;&#x4E0A;&#x7684;&#x6570;&#x503C;&#x8D8A;&#x5C0F;&#x3002;</strong></p>
<h2 id="&#x7CBE;&#x51C6;&#x7387;">&#x7CBE;&#x51C6;&#x7387;</h2>
<p><strong>&#x7CBE;&#x51C6;&#x7387;(Precision)</strong>&#x6307;&#x7684;&#x662F;&#x6A21;&#x578B;&#x9884;&#x6D4B;&#x4E3A; Positive &#x65F6;&#x7684;&#x9884;&#x6D4B;&#x51C6;&#x786E;&#x5EA6;&#xFF0C;&#x5176;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>P</mi><mi>r</mi><mi>e</mi><mi>c</mi><mi>i</mi><mi>s</mi><mi>i</mi><mi>o</mi><mi>i</mi><mi>n</mi><mo>=</mo><mfrac><mrow><mi>T</mi><mi>P</mi></mrow><mrow><mi>T</mi><mi>P</mi><mo>+</mo><mi>F</mi><mi>P</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">
Precisioin=\frac{TP}{TP+FP}
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.872331em;"></span><span class="strut bottom" style="height:1.275662em;vertical-align:-0.403331em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.13889em;">P</span><span class="mord mathit" style="margin-right:0.02778em;">r</span><span class="mord mathit">e</span><span class="mord mathit">c</span><span class="mord mathit">i</span><span class="mord mathit">s</span><span class="mord mathit">i</span><span class="mord mathit">o</span><span class="mord mathit">i</span><span class="mord mathit">n</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span><span class="mbin mtight">+</span><span class="mord mathit mtight" style="margin-right:0.13889em;">F</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.394em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span></span></span></span></p>
<p>&#x5047;&#x5982;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x7684;&#x6DF7;&#x6DC6;&#x77E9;&#x9635;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x771F;&#x5B9E;\&#x9884;&#x6D4B;</th>
<th>0</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>9978</td>
<td>12</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>8</td>
</tr>
</tbody>
</table>
<p>&#x5219;&#x8BE5;&#x7CFB;&#x7EDF;&#x7684;&#x7CBE;&#x51C6;&#x7387;=8/(8+12)=0.4 &#x3002;</p>
<p>0.4 &#x8FD9;&#x4E2A;&#x503C;&#x8868;&#x793A;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x7684;&#x9884;&#x6D4B;&#x7ED3;&#x679C;&#x4E2D;&#x5982;&#x679C;&#x6709; 100 &#x4E2A;&#x4EBA;&#x88AB;&#x9884;&#x6D4B;&#x6210;&#x60A3;&#x6709;&#x764C;&#x75C7;&#xFF0C;&#x90A3;&#x4E48;&#x5176;&#x4E2D;&#x6709; 40 &#x4EBA;&#x662F;&#x771F;&#x7684;&#x60A3;&#x6709;&#x764C;&#x75C7;&#x3002;<strong>&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x7CBE;&#x51C6;&#x7387;&#x8D8A;&#x9AD8;&#xFF0C;&#x90A3;&#x4E48;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x9884;&#x6D4B;&#x67D0;&#x4EBA;&#x60A3;&#x6709;&#x764C;&#x75C7;&#x7684;&#x53EF;&#x4FE1;&#x5EA6;&#x5C31;&#x8D8A;&#x9AD8;&#x3002;</strong></p>
<h2 id="&#x53EC;&#x56DE;&#x7387;">&#x53EC;&#x56DE;&#x7387;</h2>
<p><strong>&#x53EC;&#x56DE;&#x7387;(Recall)</strong>&#x6307;&#x7684;&#x662F;&#x6211;&#x4EEC;&#x5173;&#x6CE8;&#x7684;&#x4E8B;&#x4EF6;&#x53D1;&#x751F;&#x4E86;&#xFF0C;&#x5E76;&#x4E14;&#x6A21;&#x578B;&#x9884;&#x6D4B;&#x6B63;&#x786E;&#x4E86;&#x7684;&#x6BD4;&#x503C;&#xFF0C;&#x5176;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>R</mi><mi>e</mi><mi>c</mi><mi>a</mi><mi>l</mi><mi>l</mi><mo>=</mo><mfrac><mrow><mi>T</mi><mi>P</mi></mrow><mrow><mi>F</mi><mi>N</mi><mo>+</mo><mi>T</mi><mi>P</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">
Recall=\frac{TP}{FN+TP}
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.872331em;"></span><span class="strut bottom" style="height:1.275662em;vertical-align:-0.403331em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.00773em;">R</span><span class="mord mathit">e</span><span class="mord mathit">c</span><span class="mord mathit">a</span><span class="mord mathit" style="margin-right:0.01968em;">l</span><span class="mord mathit" style="margin-right:0.01968em;">l</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">F</span><span class="mord mathit mtight" style="margin-right:0.10903em;">N</span><span class="mbin mtight">+</span><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.394em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span></span></span></span></p>
<p>&#x5047;&#x5982;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#x7CFB;&#x7EDF;&#x7684;&#x6DF7;&#x6DC6;&#x77E9;&#x9635;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x771F;&#x5B9E;\&#x9884;&#x6D4B;</th>
<th>0</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>9978</td>
<td>12</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>8</td>
</tr>
</tbody>
</table>
<p>&#x5219;&#x8BE5;&#x7CFB;&#x7EDF;&#x7684;&#x53EC;&#x56DE;&#x7387;=8/(8+2)=0.8&#x3002;</p>
<p>&#x4ECE;&#x8BA1;&#x7B97;&#x51FA;&#x7684;&#x53EC;&#x56DE;&#x7387;&#x53EF;&#x4EE5;&#x770B;&#x51FA;&#xFF0C;&#x5047;&#x8BBE;&#x6709; 100 &#x4E2A;&#x60A3;&#x6709;&#x764C;&#x75C7;&#x7684;&#x75C5;&#x4EBA;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x7CFB;&#x7EDF;&#x8FDB;&#x884C;&#x764C;&#x75C7;&#x68C0;&#x6D4B;&#xFF0C;&#x7CFB;&#x7EDF;&#x80FD;&#x591F;&#x68C0;&#x6D4B;&#x51FA; 80 &#x4EBA;&#x662F;&#x60A3;&#x6709;&#x764C;&#x75C7;&#x7684;&#x3002;<strong>&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x8D8A;&#x9AD8;&#xFF0C;&#x90A3;&#x4E48;&#x6211;&#x4EEC;&#x611F;&#x5174;&#x8DA3;&#x7684;&#x5BF9;&#x8C61;&#x6210;&#x4E3A;&#x6F0F;&#x7F51;&#x4E4B;&#x9C7C;&#x7684;&#x53EF;&#x80FD;&#x6027;&#x8D8A;&#x4F4E;&#x3002;</strong></p>
<h2 id="&#x7CBE;&#x51C6;&#x7387;&#x4E0E;&#x53EC;&#x56DE;&#x7387;&#x4E4B;&#x95F4;&#x7684;&#x5173;&#x7CFB;">&#x7CBE;&#x51C6;&#x7387;&#x4E0E;&#x53EC;&#x56DE;&#x7387;&#x4E4B;&#x95F4;&#x7684;&#x5173;&#x7CFB;</h2>
<p>&#x5047;&#x8BBE;&#x6709;&#x8FD9;&#x4E48;&#x4E00;&#x7EC4;&#x6570;&#x636E;&#xFF0C;&#x83F1;&#x5F62;&#x4EE3;&#x8868; Positive &#xFF0C;&#x5706;&#x5F62;&#x4EE3;&#x8868; Negtive &#x3002;</p>
<p><img src="img/66.jpg" alt=""></p>
<p>&#x73B0;&#x5728;&#x9700;&#x8981;&#x8BAD;&#x7EC3;&#x4E00;&#x4E2A;&#x6A21;&#x578B;&#x5BF9;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x5206;&#x7C7B;&#xFF0C;&#x5047;&#x5982;&#x8BE5;&#x6A21;&#x578B;&#x975E;&#x5E38;&#x7B80;&#x5355;&#xFF0C;&#x5C31;&#x662F;&#x5728;&#x6570;&#x636E;&#x4E0A;&#x753B;&#x4E00;&#x6761;&#x7EBF;&#x4F5C;&#x4E3A;&#x5206;&#x7C7B;&#x8FB9;&#x754C;&#x3002;&#x6A21;&#x578B;&#x8BA4;&#x4E3A;&#x8FB9;&#x754C;&#x7684;&#x5DE6;&#x8FB9;&#x662F; Negtive &#xFF0C;&#x53F3;&#x8FB9;&#x662F; Positive &#x3002;&#x5982;&#x679C;&#x8BE5;&#x6A21;&#x578B;&#x7684;&#x5206;&#x7C7B;&#x8FB9;&#x754C;&#x5411;&#x5DE6;&#x6216;&#x8005;&#x5411;&#x53F3;&#x79FB;&#x52A8;&#x7684;&#x8BDD;&#xFF0C;&#x6A21;&#x578B;&#x6240;&#x5BF9;&#x5E94;&#x7684;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;&#xFF1A;</p>
<p><img src="img/67.jpg" alt=""></p>
<p>&#x4ECE;&#x4E0A;&#x56FE;&#x53EF;&#x77E5;&#xFF0C;<strong>&#x6A21;&#x578B;&#x7684;&#x7CBE;&#x51C6;&#x7387;&#x53D8;&#x9AD8;&#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4F1A;&#x53D8;&#x4F4E;&#xFF0C;&#x7CBE;&#x51C6;&#x7387;&#x53D8;&#x4F4E;&#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4F1A;&#x53D8;&#x9AD8;&#x3002;</strong></p>
<h2 id="f1-score">F1 Score</h2>
<p>&#x4E0A;&#x4E00;&#x5173;&#x4E2D;&#x63D0;&#x5230;&#x4E86;&#x7CBE;&#x51C6;&#x7387;&#x53D8;&#x9AD8;&#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4F1A;&#x53D8;&#x4F4E;&#xFF0C;&#x7CBE;&#x51C6;&#x7387;&#x53D8;&#x4F4E;&#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4F1A;&#x53D8;&#x9AD8;&#x3002;&#x90A3;&#x5982;&#x679C;&#x60F3;&#x8981;&#x540C;&#x65F6;&#x517C;&#x987E;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#xFF0C;&#x8FD9;&#x4E2A;&#x65F6;&#x5019;&#x5C31;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<strong>F1 Score</strong>&#x6765;&#x4F5C;&#x4E3A;&#x6027;&#x80FD;&#x5EA6;&#x91CF;&#x6307;&#x6807;&#x4E86;&#x3002;</p>
<p>F1 Score &#x662F;&#x7EDF;&#x8BA1;&#x5B66;&#x4E2D;&#x7528;&#x6765;&#x8861;&#x91CF;&#x4E8C;&#x5206;&#x7C7B;&#x6A21;&#x578B;&#x7CBE;&#x786E;&#x5EA6;&#x7684;&#x4E00;&#x79CD;&#x6307;&#x6807;&#x3002;&#x5B83;&#x540C;&#x65F6;&#x517C;&#x987E;&#x4E86;&#x5206;&#x7C7B;&#x6A21;&#x578B;&#x7684;&#x51C6;&#x786E;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x3002;F1 Score &#x53EF;&#x4EE5;&#x770B;&#x4F5C;&#x662F;&#x6A21;&#x578B;&#x51C6;&#x786E;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x7684;&#x4E00;&#x79CD;&#x52A0;&#x6743;&#x5E73;&#x5747;&#xFF0C;&#x5B83;&#x7684;&#x6700;&#x5927;&#x503C;&#x662F; 1 &#xFF0C;&#x6700;&#x5C0F;&#x503C;&#x662F;0 &#x3002;&#x5176;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mn>1</mn><mo>=</mo><mfrac><mrow><mn>2</mn><mo>&#x2217;</mo><mi>p</mi><mi>r</mi><mi>e</mi><mi>c</mi><mi>i</mi><mi>s</mi><mi>i</mi><mi>o</mi><mi>n</mi><mo>&#x2217;</mo><mi>r</mi><mi>e</mi><mi>c</mi><mi>a</mi><mi>l</mi><mi>l</mi></mrow><mrow><mi>p</mi><mi>r</mi><mi>e</mi><mi>c</mi><mi>i</mi><mi>s</mi><mi>i</mi><mi>o</mi><mi>n</mi><mo>+</mo><mi>r</mi><mi>e</mi><mi>c</mi><mi>a</mi><mi>l</mi><mi>l</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">
F1=\frac{2*precision*recall}{precision+recall}
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.9322159999999999em;"></span><span class="strut bottom" style="height:1.4133239999999998em;vertical-align:-0.481108em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.13889em;">F</span><span class="mord mathrm">1</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathit mtight">p</span><span class="mord mathit mtight" style="margin-right:0.02778em;">r</span><span class="mord mathit mtight">e</span><span class="mord mathit mtight">c</span><span class="mord mathit mtight">i</span><span class="mord mathit mtight">s</span><span class="mord mathit mtight">i</span><span class="mord mathit mtight">o</span><span class="mord mathit mtight">n</span><span class="mbin mtight">+</span><span class="mord mathit mtight" style="margin-right:0.02778em;">r</span><span class="mord mathit mtight">e</span><span class="mord mathit mtight">c</span><span class="mord mathit mtight">a</span><span class="mord mathit mtight" style="margin-right:0.01968em;">l</span><span class="mord mathit mtight" style="margin-right:0.01968em;">l</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.44610799999999995em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mord mathrm mtight">2</span><span class="mbin mtight">&#x2217;</span><span class="mord mathit mtight">p</span><span class="mord mathit mtight" style="margin-right:0.02778em;">r</span><span class="mord mathit mtight">e</span><span class="mord mathit mtight">c</span><span class="mord mathit mtight">i</span><span class="mord mathit mtight">s</span><span class="mord mathit mtight">i</span><span class="mord mathit mtight">o</span><span class="mord mathit mtight">n</span><span class="mbin mtight">&#x2217;</span><span class="mord mathit mtight" style="margin-right:0.02778em;">r</span><span class="mord mathit mtight">e</span><span class="mord mathit mtight">c</span><span class="mord mathit mtight">a</span><span class="mord mathit mtight" style="margin-right:0.01968em;">l</span><span class="mord mathit mtight" style="margin-right:0.01968em;">l</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span></span></span></span></p>
<ul>
<li><p>&#x5047;&#x8BBE;&#x6A21;&#x578B; A &#x7684;&#x7CBE;&#x51C6;&#x7387;&#x4E3A; 0.2 &#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4E3A; 0.7 &#xFF0C;&#x90A3;&#x4E48;&#x6A21;&#x578B; A &#x7684; F1 Score &#x4E3A; 0.31111 &#x3002;</p>
</li>
<li><p>&#x5047;&#x8BBE;&#x6A21;&#x578B; B &#x7684;&#x7CBE;&#x51C6;&#x7387;&#x4E3A; 0.7 &#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4E3A; 0.2 &#xFF0C;&#x90A3;&#x4E48;&#x6A21;&#x578B; B &#x7684; F1 Score &#x4E3A; 0.31111 &#x3002;</p>
</li>
<li><p>&#x5047;&#x8BBE;&#x6A21;&#x578B; C &#x7684;&#x7CBE;&#x51C6;&#x7387;&#x4E3A; 0.8 &#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4E3A; 0.7 &#xFF0C;&#x90A3;&#x4E48;&#x6A21;&#x578B; C &#x7684; F1 Score &#x4E3A; 0.74667 &#x3002;</p>
</li>
<li><p>&#x5047;&#x8BBE;&#x6A21;&#x578B; D &#x7684;&#x7CBE;&#x51C6;&#x7387;&#x4E3A; 0.2 &#xFF0C;&#x53EC;&#x56DE;&#x7387;&#x4E3A; 0.3 &#xFF0C;&#x90A3;&#x4E48;&#x6A21;&#x578B; D &#x7684; F1 Score &#x4E3A; 0.24 &#x3002;</p>
</li>
</ul>
<p>&#x4ECE;&#x4E0A;&#x8FF0; 4 &#x4E2A;&#x6A21;&#x578B;&#x7684;&#x5404;&#x79CD;&#x6027;&#x80FD;&#x53EF;&#x4EE5;&#x770B;&#x51FA;&#xFF0C;&#x6A21;&#x578B;C&#x7684;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x90FD;&#x6BD4;&#x8F83;&#x9AD8;&#xFF0C;&#x56E0;&#x6B64;&#x5B83;&#x7684; F1 Score &#x4E5F;&#x6BD4;&#x8F83;&#x9AD8;&#x3002;&#x800C;&#x5176;&#x4ED6;&#x6A21;&#x578B;&#x7684;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x8981;&#x4E48;&#x90FD;&#x6BD4;&#x8F83;&#x4F4E;&#xFF0C;&#x8981;&#x4E48;&#x4E00;&#x4E2A;&#x4F4E;&#x4E00;&#x4E2A;&#x9AD8;&#xFF0C;&#x6240;&#x4EE5;&#x5B83;&#x4EEC;&#x7684; F1 Score &#x6BD4;&#x8F83;&#x4F4E;&#x3002;</p>
<p>&#x8FD9;&#x4E5F;&#x8BF4;&#x660E;&#x4E86;&#x53EA;&#x6709;&#x5F53;&#x6A21;&#x578B;&#x7684;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x90FD;&#x6BD4;&#x8F83;&#x9AD8;&#x65F6; F1 Score &#x624D;&#x4F1A;&#x6BD4;&#x8F83;&#x9AD8;&#x3002;&#x8FD9;&#x4E5F;&#x662F; F1 Score &#x80FD;&#x591F;&#x540C;&#x65F6;&#x517C;&#x987E;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x7684;&#x539F;&#x56E0;&#x3002;</p>
<h2 id="roc&#x66F2;&#x7EBF;">ROC&#x66F2;&#x7EBF;</h2>
<p>ROC&#x66F2;&#x7EBF;(Receiver Operating Characteristic Curve)&#x63CF;&#x8FF0;&#x7684; TPR&#xFF08;True Positive Rate&#xFF09;&#x4E0E; FPR&#xFF08;False Positive Rate&#xFF09;&#x4E4B;&#x95F4;&#x5173;&#x7CFB;&#x7684;&#x66F2;&#x7EBF;&#x3002;</p>
<p>TPR &#x4E0E; FPR &#x7684;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>T</mi><mi>P</mi><mi>R</mi><mo>=</mo><mfrac><mrow><mi>T</mi><mi>P</mi></mrow><mrow><mi>T</mi><mi>P</mi><mo>+</mo><mi>F</mi><mi>N</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">
TPR=\frac{TP}{TP+FN}
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.872331em;"></span><span class="strut bottom" style="height:1.275662em;vertical-align:-0.403331em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.13889em;">T</span><span class="mord mathit" style="margin-right:0.13889em;">P</span><span class="mord mathit" style="margin-right:0.00773em;">R</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span><span class="mbin mtight">+</span><span class="mord mathit mtight" style="margin-right:0.13889em;">F</span><span class="mord mathit mtight" style="margin-right:0.10903em;">N</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.394em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span></span></span></span></p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mi>P</mi><mi>R</mi><mo>=</mo><mfrac><mrow><mi>F</mi><mi>P</mi></mrow><mrow><mi>F</mi><mi>P</mi><mo>+</mo><mi>T</mi><mi>N</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">
FPR=\frac{FP}{FP+TN}
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.872331em;"></span><span class="strut bottom" style="height:1.275662em;vertical-align:-0.403331em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.13889em;">F</span><span class="mord mathit" style="margin-right:0.13889em;">P</span><span class="mord mathit" style="margin-right:0.00773em;">R</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">F</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span><span class="mbin mtight">+</span><span class="mord mathit mtight" style="margin-right:0.13889em;">T</span><span class="mord mathit mtight" style="margin-right:0.10903em;">N</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.394em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mord mathit mtight" style="margin-right:0.13889em;">F</span><span class="mord mathit mtight" style="margin-right:0.13889em;">P</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span></span></span></span></p>
<p>&#x5176;&#x4E2D; TPR &#x7684;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x60A8;&#x53EF;&#x80FD;&#x6709;&#x70B9;&#x773C;&#x719F;&#xFF0C;&#x6CA1;&#x9519;&#xFF01;&#x5C31;&#x662F;&#x53EC;&#x56DE;&#x7387;&#x7684;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x3002;<strong>&#x4E5F;&#x5C31;&#x662F;&#x8BF4; TPR &#x5C31;&#x662F;&#x53EC;&#x56DE;&#x7387;</strong>&#x3002;<strong>&#x6240;&#x4EE5; TPR &#x63CF;&#x8FF0;&#x7684;&#x662F;&#x6A21;&#x578B;&#x9884;&#x6D4B; Positive &#x5E76;&#x4E14;&#x9884;&#x6D4B;&#x6B63;&#x786E;&#x7684;&#x6570;&#x91CF;&#x5360;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x4E3A; Positive &#x6837;&#x672C;&#x7684;&#x6BD4;&#x4F8B;&#x3002;&#x800C; FPR &#x63CF;&#x8FF0;&#x7684;&#x6A21;&#x578B;&#x9884;&#x6D4B; Positive &#x5E76;&#x4E14;&#x9884;&#x6D4B;&#x9519;&#x4E86;&#x7684;&#x6570;&#x91CF;&#x5360;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x4E3A; Negtive &#x6837;&#x672C;&#x7684;&#x6BD4;&#x4F8B;&#x3002;</strong></p>
<p>&#x548C;&#x7CBE;&#x51C6;&#x7387;&#x4E0E;&#x53EC;&#x56DE;&#x7387;&#x4E00;&#x6837;&#xFF0C; TPR &#x4E0E; FPR &#x4E4B;&#x95F4;&#x4E5F;&#x5B58;&#x5728;&#x5173;&#x7CFB;&#x3002;&#x5047;&#x8BBE;&#x6709;&#x8FD9;&#x4E48;&#x4E00;&#x7EC4;&#x6570;&#x636E;&#xFF0C;&#x83F1;&#x5F62;&#x4EE3;&#x8868; Positive &#xFF0C;&#x5706;&#x5F62;&#x4EE3;&#x8868; Negtive &#x3002;</p>
<p><img src="img/66.jpg" alt=""></p>
<p>&#x73B0;&#x5728;&#x9700;&#x8981;&#x8BAD;&#x7EC3;&#x4E00;&#x4E2A;&#x903B;&#x8F91;&#x56DE;&#x5F52;&#x7684;&#x6A21;&#x578B;&#x5BF9;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x5206;&#x7C7B;&#xFF0C;&#x5047;&#x5982;&#x5C06;&#x4ECE; 0 &#x5230; 1 &#x4E2D;&#x7684;&#x4E00;&#x4E9B;&#x503C;&#x4F5C;&#x4E3A;&#x6A21;&#x578B;&#x7684;&#x5206;&#x7C7B;&#x9608;&#x503C;&#x3002;&#x82E5;&#x6A21;&#x578B;&#x8BA4;&#x4E3A;&#x5F53;&#x524D;&#x6570;&#x636E;&#x662F; Positive &#x7684;&#x6982;&#x7387;<strong>&#x5C0F;&#x4E8E;</strong>&#x5206;&#x7C7B;&#x9608;&#x503C;&#x5219;&#x5206;&#x7C7B;&#x4E3A; Negtive &#xFF0C;<strong>&#x5426;&#x5219;</strong>&#x5C31;&#x5206;&#x7C7B;&#x4E3A; Positive &#xFF08;<strong>&#x5047;&#x8BBE;&#x5206;&#x7C7B;&#x9608;&#x503C;&#x4E3A; 0.8 &#xFF0C;&#x6A21;&#x578B;&#x8BA4;&#x4E3A;&#x8FD9;&#x6761;&#x6570;&#x636E;&#x662F; Positive &#x7684;&#x6982;&#x7387;&#x4E3A; 0.7 &#xFF0C; 0.7 &#x5C0F;&#x4E8E; 0.8 &#xFF0C;&#x90A3;&#x4E48;&#x6A21;&#x578B;&#x5C31;&#x8BA4;&#x4E3A;&#x8FD9;&#x6761;&#x6570;&#x636E;&#x662F; Negtive</strong>&#xFF09;&#x3002;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x5206;&#x7C7B;&#x9608;&#x503C;&#x4E0B;&#xFF0C;&#x6A21;&#x578B;&#x6240;&#x5BF9;&#x5E94;&#x7684; TPR &#x4E0E; FPR &#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;&#xFF08;&#x7AD6;&#x7EBF;&#x4EE3;&#x8868;&#x5206;&#x7C7B;&#x9608;&#x503C;&#xFF0C;&#x6A21;&#x578B;&#x4F1A;&#x5C06;&#x7AD6;&#x7EBF;&#x5DE6;&#x8FB9;&#x7684;&#x6570;&#x636E;&#x5206;&#x7C7B;&#x6210; Negtive &#xFF0C;&#x7AD6;&#x7EBF;&#x53F3;&#x8FB9;&#x7684;&#x5206;&#x7C7B;&#x6210; Positive &#xFF09;&#xFF1A;</p>
<p><img src="img/68.jpg" alt=""></p>
<p>&#x4ECE;&#x56FE;&#x4E2D;&#x53EF;&#x4EE5;&#x770B;&#x51FA;&#xFF0C;<strong>&#x5F53;&#x6A21;&#x578B;&#x7684; TPR &#x8D8A;&#x9AD8; FPR &#x4E5F;&#x4F1A;&#x8D8A;&#x9AD8;&#xFF0C; TPR &#x8D8A;&#x4F4E; FPR &#x4E5F;&#x4F1A;&#x8D8A;&#x4F4E;&#x3002;&#x8FD9;&#x4E0E;&#x7CBE;&#x51C6;&#x7387;&#x548C;&#x53EC;&#x56DE;&#x7387;&#x4E4B;&#x95F4;&#x7684;&#x5173;&#x7CFB;&#x521A;&#x597D;&#x76F8;&#x53CD;&#x3002;</strong>&#x5E76;&#x4E14;&#xFF0C;&#x6A21;&#x578B;&#x7684;&#x5206;&#x7C7B;&#x9608;&#x503C;&#x4E00;&#x4F46;&#x6539;&#x53D8;&#xFF0C;&#x5C31;&#x6709;&#x4E00;&#x7EC4;&#x5BF9;&#x5E94;&#x7684; TPR &#x4E0E; FPR &#x3002;&#x5047;&#x8BBE;&#x8BE5;&#x6A21;&#x578B;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x5206;&#x7C7B;&#x9608;&#x503C;&#x4E0B;&#x5176;&#x5BF9;&#x5E94;&#x7684; TPR &#x4E0E; FPR &#x5982;&#x4E0B;&#x8868;&#x6240;&#x793A;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>TPR</th>
<th>FPR</th>
</tr>
</thead>
<tbody>
<tr>
<td>0.2</td>
<td>0.08</td>
</tr>
<tr>
<td>0.35</td>
<td>0.1</td>
</tr>
<tr>
<td>0.37</td>
<td>0.111</td>
</tr>
<tr>
<td>0.51</td>
<td>0.12</td>
</tr>
<tr>
<td>0.53</td>
<td>0.13</td>
</tr>
<tr>
<td>0.56</td>
<td>0.14</td>
</tr>
<tr>
<td>0.71</td>
<td>0.21</td>
</tr>
<tr>
<td>0.82</td>
<td>0.26</td>
</tr>
<tr>
<td>0.92</td>
<td>0.41</td>
</tr>
<tr>
<td>0.93</td>
<td>0.42</td>
</tr>
</tbody>
</table>
<p>&#x82E5;&#x5C06; FPR &#x4F5C;&#x4E3A;&#x6A2A;&#x8F74;&#xFF0C; TPR &#x4F5C;&#x4E3A;&#x7EB5;&#x8F74;&#xFF0C;&#x5C06;&#x4E0A;&#x9762;&#x7684;&#x8868;&#x683C;&#x4EE5;&#x6298;&#x7EBF;&#x56FE;&#x7684;&#x5F62;&#x5F0F;&#x753B;&#x51FA;&#x6765;&#x5C31;&#x662F; ROC&#x66F2;&#x7EBF; &#x3002;</p>
<p><img src="img/69.jpg" alt=""></p>
<p>&#x5047;&#x8BBE;&#x73B0;&#x5728;&#x6709;&#x6A21;&#x578B; A &#x548C;&#x6A21;&#x578B; B &#xFF0C;&#x5B83;&#x4EEC;&#x7684; ROC &#x66F2;&#x7EBF;&#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;(&#x5176;&#x4E2D;&#x6A21;&#x578B; A &#x7684; ROC&#x66F2;&#x7EBF; &#x4E3A;&#x9EC4;&#x8272;&#xFF0C;&#x6A21;&#x578B; B &#x7684; ROC&#x66F2;&#x7EBF; &#x4E3A;&#x84DD;&#x8272;)&#xFF1A;</p>
<p><img src="img/70.jpg" alt=""></p>
<p>&#x90A3;&#x4E48;&#x6A21;&#x578B; A &#x7684;&#x6027;&#x80FD;&#x6BD4;&#x6A21;&#x578B; B &#x7684;&#x6027;&#x80FD;&#x597D;&#xFF0C;&#x56E0;&#x4E3A;&#x6A21;&#x578B; A &#x5F53; FPR &#x8F83;&#x4F4E;&#x65F6;&#x6240;&#x5BF9;&#x5E94;&#x7684; TPR &#x6BD4;&#x6A21;&#x578B; B &#x7684;&#x4F4E; FPR &#x6240;&#x5BF9;&#x5E94;&#x7684; TPR &#x66F4;&#x9AD8;&#x3002;&#x7531;&#x7531;&#x4E8E;&#x968F;&#x7740; FPR &#x7684;&#x589E;&#x5927;&#xFF0C; TPR &#x4E5F;&#x4F1A;&#x589E;&#x5927;&#x3002;&#x6240;&#x4EE5; ROC &#x66F2;&#x7EBF;&#x4E0E;&#x6A2A;&#x8F74;&#x6240;&#x56F4;&#x6210;&#x7684;&#x9762;&#x79EF;&#x8D8A;&#x5927;&#xFF0C;&#x6A21;&#x578B;&#x7684;&#x5206;&#x7C7B;&#x6027;&#x80FD;&#x5C31;&#x8D8A;&#x9AD8;&#x3002;&#x800C; ROC&#x66F2;&#x7EBF; &#x7684;&#x9762;&#x79EF;&#x79F0;&#x4E3A; AUC&#x3002;</p>
<h5 id="auc">AUC</h5>
<p>&#x5F88;&#x660E;&#x663E;&#x6A21;&#x578B;&#x7684; AUC &#x8D8A;&#x9AD8;&#xFF0C;&#x6A21;&#x578B;&#x7684;&#x4E8C;&#x5206;&#x7C7B;&#x6027;&#x80FD;&#x5C31;&#x8D8A;&#x5F3A;&#x3002; AUC &#x7684;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>A</mi><mi>U</mi><mi>C</mi><mo>=</mo><mfrac><mrow><msub><mo>&#x2211;</mo><mrow><mi>i</mi><mi>e</mi><mi>p</mi><mi>o</mi><mi>s</mi><mi>i</mi><mi>t</mi><mi>i</mi><mi>v</mi><mi>e</mi><mi>c</mi><mi>l</mi><mi>a</mi><mi>s</mi><mi>s</mi></mrow></msub><mi>r</mi><mi>a</mi><mi>n</mi><msub><mi>k</mi><mi>i</mi></msub><mo>&#x2212;</mo><mfrac><mrow><mi>M</mi><mo>(</mo><mi>M</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mrow><mn>2</mn></mrow></mfrac></mrow><mrow><mi>M</mi><mo>&#x2217;</mo><mi>N</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">
AUC=\frac{\sum_{ie positive class}rank_i-\frac{M(M+1)}{2}}{M*N}
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:1.366927em;"></span><span class="strut bottom" style="height:1.711927em;vertical-align:-0.345em;"></span><span class="base textstyle uncramped"><span class="mord mathit">A</span><span class="mord mathit" style="margin-right:0.10903em;">U</span><span class="mord mathit" style="margin-right:0.07153em;">C</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathit mtight" style="margin-right:0.10903em;">M</span><span class="mbin mtight">&#x2217;</span><span class="mord mathit mtight" style="margin-right:0.10903em;">N</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.631927em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mop mtight"><span class="mop op-symbol small-op mtight" style="top:0.074995em;">&#x2211;</span><span class="msupsub"><span class="vlist"><span style="top:0.32101em;margin-right:0.07142857142857144em;margin-left:0em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle scriptscriptstyle cramped mtight"><span class="mord scriptscriptstyle cramped mtight"><span class="mord mathit mtight">i</span><span class="mord mathit mtight">e</span><span class="mord mathit mtight">p</span><span class="mord mathit mtight">o</span><span class="mord mathit mtight">s</span><span class="mord mathit mtight">i</span><span class="mord mathit mtight">t</span><span class="mord mathit mtight">i</span><span class="mord mathit mtight" style="margin-right:0.03588em;">v</span><span class="mord mathit mtight">e</span><span class="mord mathit mtight">c</span><span class="mord mathit mtight" style="margin-right:0.01968em;">l</span><span class="mord mathit mtight">a</span><span class="mord mathit mtight">s</span><span class="mord mathit mtight">s</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span></span><span class="mord mathit mtight" style="margin-right:0.02778em;">r</span><span class="mord mathit mtight">a</span><span class="mord mathit mtight">n</span><span class="mord mtight"><span class="mord mathit mtight" style="margin-right:0.03148em;">k</span><span class="msupsub"><span class="vlist"><span style="top:0.143em;margin-right:0.07142857142857144em;margin-left:-0.03148em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle scriptscriptstyle cramped mtight"><span class="mord mathit mtight">i</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span></span><span class="mbin mtight">&#x2212;</span><span class="mord reset-scriptstyle scriptstyle uncramped mtight"><span class="mopen sizing reset-size5 size5 reset-scriptstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.344em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle scriptscriptstyle cramped mtight"><span class="mord scriptscriptstyle cramped mtight"><span class="mord mathrm mtight">2</span></span></span></span><span style="top:-0.22142857142857142em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle textstyle uncramped frac-line"></span></span><span style="top:-0.5142857142857142em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle scriptscriptstyle uncramped mtight"><span class="mord scriptscriptstyle uncramped mtight"><span class="mord mathit mtight" style="margin-right:0.10903em;">M</span><span class="mopen mtight">(</span><span class="mord mathit mtight" style="margin-right:0.10903em;">M</span><span class="mbin mtight">+</span><span class="mord mathrm mtight">1</span><span class="mclose mtight">)</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-scriptstyle textstyle uncramped nulldelimiter"></span></span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span></span></span></span></p>
<p>&#x5176;&#x4E2D; M &#x4E3A;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x4E3A; Positive &#x7684;&#x6837;&#x672C;&#x6570;&#x91CF;&#xFF0C; N &#x4E3A;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x4E3A; Negtive &#x7684;&#x6837;&#x672C;&#x6570;&#x91CF;&#x3002; ranki &#x4EE3;&#x8868;&#x4E86;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x4E3A; Positive &#x7684;&#x6837;&#x672C;&#x70B9;&#x989D;&#x9884;&#x6D4B;&#x6982;&#x7387;&#x4ECE;&#x5C0F;&#x5230;&#x5927;&#x6392;&#x5E8F;&#x540E;&#xFF0C;&#x8BE5;&#x9884;&#x6D4B;&#x6982;&#x7387;&#x6392;&#x5728;&#x7B2C;&#x51E0;&#x3002;</p>
<p>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF0C;&#x73B0;&#x6709;&#x9884;&#x6D4B;&#x6982;&#x7387;&#x4E0E;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x7684;&#x8868;&#x683C;&#x5982;&#x4E0B;&#x6240;&#x793A;&#xFF08;&#x5176;&#x4E2D; 0 &#x8868;&#x793A; Negtive &#xFF0C; 1 &#x8868;&#x793A; Positive &#xFF09;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x7F16;&#x53F7;</th>
<th>&#x9884;&#x6D4B;&#x6982;&#x7387;</th>
<th>&#x771F;&#x5B9E;&#x7C7B;&#x522B;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>0.1</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>0.4</td>
<td>0</td>
</tr>
<tr>
<td>3</td>
<td>0.3</td>
<td>1</td>
</tr>
<tr>
<td>4</td>
<td>0.8</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>&#x60F3;&#x8981;&#x5F97;&#x5230;&#x516C;&#x5F0F;&#x4E2D;&#x7684; rank &#xFF0C;&#x5C31;&#x9700;&#x8981;&#x5C06;&#x9884;&#x6D4B;&#x6982;&#x7387;&#x4ECE;&#x5C0F;&#x5230;&#x5927;&#x6392;&#x5E8F;&#xFF0C;&#x6392;&#x5E8F;&#x540E;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x7F16;&#x53F7;</th>
<th>&#x9884;&#x6D4B;&#x6982;&#x7387;</th>
<th>&#x771F;&#x5B9E;&#x7C7B;&#x522B;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>0.1</td>
<td>0</td>
</tr>
<tr>
<td>3</td>
<td>0.3</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>0.4</td>
<td>0</td>
</tr>
<tr>
<td>4</td>
<td>0.8</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>&#x6392;&#x5E8F;&#x540E;&#x7684;&#x8868;&#x683C;&#x4E2D;&#xFF0C;&#x771F;&#x5B9E;&#x7C7B;&#x522B;&#x4E3A; Positive &#x53EA;&#x6709;&#x7F16;&#x53F7;&#x4E3A; 3 &#x548C;&#x7F16;&#x53F7;&#x4E3A; 4 &#x7684;&#x6570;&#x636E;&#xFF0C;&#x5E76;&#x4E14;&#x7F16;&#x53F7;&#x4E3A; 3 &#x7684;&#x6570;&#x636E;&#x6392;&#x5728;&#x7B2C; 2 &#xFF0C;&#x7F16;&#x53F7;&#x4E3A; 4 &#x7684;&#x6570;&#x636E;&#x6392;&#x5728;&#x7B2C; 4 &#x3002;&#x6240;&#x4EE5; rank=[2, 4]&#x3002;&#x53C8;&#x56E0;&#x8868;&#x683C;&#x4E2D;&#x771F;&#x662F;&#x7C7B;&#x522B;&#x4E3A; Positive &#x7684;&#x6570;&#x636E;&#x6709; 2 &#x6761;&#xFF0C;Negtive &#x7684;&#x6570;&#x636E;&#x6709; 2 &#x6761;&#x3002;&#x56E0;&#x6B64; M &#x4E3A;2&#xFF0C;N &#x4E3A;2&#x3002;&#x6240;&#x4EE5;&#x6839;&#x636E; AUC &#x7684;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x53EF;&#x77E5;&#xFF1A;</p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>A</mi><mi>U</mi><mi>C</mi><mo>=</mo><mfrac><mrow><mo>(</mo><mn>2</mn><mo>+</mo><mn>4</mn><mo>)</mo><mo>&#x2212;</mo><mfrac><mrow><mn>2</mn><mo>(</mo><mn>2</mn><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mrow><mn>2</mn></mrow></mfrac></mrow><mrow><mn>2</mn><mo>&#x2217;</mo><mn>2</mn></mrow></mfrac><mo>=</mo><mn>0</mn><mi mathvariant="normal">.</mi><mn>7</mn><mn>5</mn></mrow><annotation encoding="application/x-tex">
AUC=\frac{(2+4)-\frac{2(2+1)}{2}}{2*2}=0.75
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:1.2858em;"></span><span class="strut bottom" style="height:1.6308em;vertical-align:-0.345em;"></span><span class="base textstyle uncramped"><span class="mord mathit">A</span><span class="mord mathit" style="margin-right:0.10903em;">U</span><span class="mord mathit" style="margin-right:0.07153em;">C</span><span class="mrel">=</span><span class="mord reset-textstyle textstyle uncramped"><span class="mopen sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.345em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle cramped mtight"><span class="mord scriptstyle cramped mtight"><span class="mord mathrm mtight">2</span><span class="mbin mtight">&#x2217;</span><span class="mord mathrm mtight">2</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.5508em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord scriptstyle uncramped mtight"><span class="mopen mtight">(</span><span class="mord mathrm mtight">2</span><span class="mbin mtight">+</span><span class="mord mathrm mtight">4</span><span class="mclose mtight">)</span><span class="mbin mtight">&#x2212;</span><span class="mord reset-scriptstyle scriptstyle uncramped mtight"><span class="mopen sizing reset-size5 size5 reset-scriptstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.344em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle scriptscriptstyle cramped mtight"><span class="mord scriptscriptstyle cramped mtight"><span class="mord mathrm mtight">2</span></span></span></span><span style="top:-0.22142857142857142em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle textstyle uncramped frac-line"></span></span><span style="top:-0.5142857142857142em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span><span class="reset-scriptstyle scriptscriptstyle uncramped mtight"><span class="mord scriptscriptstyle uncramped mtight"><span class="mord mathrm mtight">2</span><span class="mopen mtight">(</span><span class="mord mathrm mtight">2</span><span class="mbin mtight">+</span><span class="mord mathrm mtight">1</span><span class="mclose mtight">)</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-scriptstyle textstyle uncramped nulldelimiter"></span></span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">&#x200B;</span></span>&#x200B;</span></span></span><span class="mclose sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span><span class="mrel">=</span><span class="mord mathrm">0</span><span class="mord mathrm">.</span><span class="mord mathrm">7</span><span class="mord mathrm">5</span></span></span></span>&#x3002;</p>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="metrics.html" class="navigation navigation-prev " aria-label="Previous page: 模型评估指标">
<i class="fa fa-angle-left"></i>
</a>
<a href="regression_metrics.html" class="navigation navigation-next " aria-label="Next page: 回归性能评估指标">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"分类性能评估指标","level":"1.4.1","depth":2,"next":{"title":"回归性能评估指标","level":"1.4.2","depth":2,"path":"regression_metrics.md","ref":"regression_metrics.md","articles":[]},"previous":{"title":"模型评估指标","level":"1.4","depth":1,"path":"metrics.md","ref":"metrics.md","articles":[{"title":"分类性能评估指标","level":"1.4.1","depth":2,"path":"classification_metrics.md","ref":"classification_metrics.md","articles":[]},{"title":"回归性能评估指标","level":"1.4.2","depth":2,"path":"regression_metrics.md","ref":"regression_metrics.md","articles":[]},{"title":"聚类性能评估指标","level":"1.4.3","depth":2,"path":"cluster_metrics.md","ref":"cluster_metrics.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["katex"],"pluginsConfig":{"katex":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"classification_metrics.md","mtime":"2019-07-04T07:26:51.693Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-06T07:31:21.537Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>