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.

667 lines
30 KiB

6 years ago
<!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-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="sklearn.html" />
<link rel="prev" href="regression_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 " 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 active" 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="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="&#x805A;&#x7C7B;&#x6A21;&#x578B;&#x6027;&#x80FD;&#x8BC4;&#x4F30;&#x6307;&#x6807;">&#x805A;&#x7C7B;&#x6A21;&#x578B;&#x6027;&#x80FD;&#x8BC4;&#x4F30;&#x6307;&#x6807;</h1>
<p>&#x805A;&#x7C7B;&#x7684;&#x6027;&#x80FD;&#x5EA6;&#x91CF;&#x5927;&#x81F4;&#x5206;&#x4E3A;&#x4E24;&#x7C7B;&#xFF1A;&#x4E00;&#x7C7B;&#x662F;&#x5C06;&#x805A;&#x7C7B;&#x7ED3;&#x679C;&#x4E0E;&#x67D0;&#x4E2A;&#x53C2;&#x8003;&#x6A21;&#x578B;&#x4F5C;&#x4E3A;&#x53C2;&#x7167;&#x8FDB;&#x884C;&#x6BD4;&#x8F83;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x6240;&#x8C13;&#x7684;<strong>&#x5916;&#x90E8;&#x6307;&#x6807;</strong>&#xFF1B;&#x53E6;&#x4E00;&#x7C7B;&#x662F;&#x5219;&#x662F;&#x76F4;&#x63A5;&#x5EA6;&#x91CF;&#x805A;&#x7C7B;&#x7684;&#x6027;&#x80FD;&#x800C;&#x4E0D;&#x4F7F;&#x7528;&#x53C2;&#x8003;&#x6A21;&#x578B;&#x8FDB;&#x884C;&#x6BD4;&#x8F83;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;<strong>&#x5185;&#x90E8;&#x6307;&#x6807;</strong>&#x3002;</p>
<h2 id="&#x5916;&#x90E8;&#x6307;&#x6807;">&#x5916;&#x90E8;&#x6307;&#x6807;</h2>
<p><strong>&#x5916;&#x90E8;&#x6307;&#x6807;&#x901A;&#x5E38;&#x4F7F;&#x7528; Jaccard Coefficient(JC&#x7CFB;&#x6570;)&#x3001;Fowlkes and Mallows Index(FM&#x6307;&#x6570;)&#x4EE5;&#x53CA; Rand index&#xFF08;Rand&#x6307;&#x6570;&#xFF09;&#x3002;</strong></p>
<p>&#x60F3;&#x8981;&#x8BA1;&#x7B97;&#x4E0A;&#x8FF0;&#x6307;&#x6807;&#x6765;&#x5EA6;&#x91CF;&#x805A;&#x7C7B;&#x7684;&#x6027;&#x80FD;&#xFF0C;&#x9996;&#x5148;&#x9700;&#x8981;&#x8BA1;&#x7B97;&#x51FA;<script type="math/tex; ">a</script>&#xFF0C;<script type="math/tex; ">c</script>&#xFF0C;<script type="math/tex; ">d</script>&#xFF0C;<script type="math/tex; ">e</script>&#x3002;&#x5047;&#x8BBE;&#x6570;&#x636E;&#x96C6;<script type="math/tex; ">E=\{x_1,x_2,...,x_m\}</script>&#x3002;&#x901A;&#x8FC7;&#x805A;&#x7C7B;&#x6A21;&#x578B;&#x7ED9;&#x51FA;&#x7684;&#x7C07;&#x5212;&#x5206;&#x4E3A;<script type="math/tex; ">C=\{C_1,C_2,...C_k\}</script>&#xFF0C;&#x53C2;&#x8003;&#x6A21;&#x578B;&#x7ED9;&#x51FA;&#x7684;&#x7C07;&#x5212;&#x5206;&#x4E3A;<script type="math/tex; ">D=\{D_1,D_2,...D_s\}</script>&#x3002;<script type="math/tex; ">\lambda</script>&#x4E0E;<script type="math/tex; ">\lambda^*</script>&#x5206;&#x522B;&#x8868;&#x793A;<script type="math/tex; ">C</script>&#x4E0E;<script type="math/tex; ">D</script>&#x5BF9;&#x5E94;&#x7684;&#x7C07;&#x6807;&#x8BB0;&#xFF0C;&#x5219;&#x6709;:</p>
<p><script type="math/tex; ">
a=|\{(x_i, x_j)|\lambda_i=\lambda_j, \lambda^*_i=\lambda^*_j,i < j\}|
</script></p>
<p><script type="math/tex; ">
b=|\{(x_i, x_j)|\lambda_i=\lambda_j, \lambda^*_i\neq\lambda^*_j, i < j\}|
</script></p>
<p><script type="math/tex; ">
c=|\{(x_i, x_j)|\lambda_i\neq\lambda_j, \lambda^*_i=\lambda^*_j, i < j\}|
</script></p>
<p><script type="math/tex; ">
d=|\{(x_i, x_j)|\lambda_i\neq\lambda_j, \lambda^*_i\neq\lambda^*_j, i < j\}|
</script></p>
<p>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF0C;&#x53C2;&#x8003;&#x6A21;&#x578B;&#x7ED9;&#x51FA;&#x7684;&#x7C07;&#x4E0E;&#x805A;&#x7C7B;&#x6A21;&#x578B;&#x7ED9;&#x51FA;&#x7684;&#x7C07;&#x5212;&#x5206;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x7F16;&#x53F7;</th>
<th>&#x53C2;&#x8003;&#x7C07;</th>
<th>&#x805A;&#x7C7B;&#x7C07;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>3</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>4</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>5</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>6</td>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>&#x90A3;&#x4E48;&#x6EE1;&#x8DB3;<script type="math/tex; ">a</script>&#x7684;&#x6837;&#x672C;&#x5BF9;&#x4E3A;<script type="math/tex; ">(1, 2)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">1</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">2</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">0</script>&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">0</script></strong>)&#xFF0C;<script type="math/tex; ">(5, 6)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">5</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">6</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">1</script>&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">2</script></strong>)&#x3002;&#x603B;&#x5171;&#x6709;<script type="math/tex; ">2</script>&#x4E2A;&#x6837;&#x672C;&#x5BF9;&#x6EE1;&#x8DB3;<script type="math/tex; ">a</script>&#xFF0C;&#x56E0;&#x6B64;<script type="math/tex; ">a=2</script>&#x3002;</p>
<p>&#x6EE1;&#x8DB3;<script type="math/tex; ">b</script>&#x7684;&#x6837;&#x672C;&#x5BF9;&#x4E3A;<script type="math/tex; ">(3, 4)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">3</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">4</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x4F46;&#x805A;&#x7C7B;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">1</script></strong>)&#x3002;&#x603B;&#x5171;&#x6709;<script type="math/tex; ">1</script>&#x4E2A;&#x6837;&#x672C;&#x5BF9;&#x6EE1;&#x8DB3;<script type="math/tex; ">b</script>&#xFF0C;&#x56E0;&#x6B64;<script type="math/tex; ">b=1</script>&#x3002;</p>
<p>&#x90A3;&#x4E48;&#x6EE1;&#x8DB3;<script type="math/tex; ">c</script>&#x7684;&#x6837;&#x672C;&#x5BF9;&#x4E3A;<script type="math/tex; ">(1, 3)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">1</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">3</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x805A;&#x7C7B;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x4F46;&#x53C2;&#x8003;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">0</script></strong>)&#xFF0C;<script type="math/tex; ">(2, 3)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">2</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">3</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x805A;&#x7C7B;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x4F46;&#x53C2;&#x8003;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">0</script></strong>)&#xFF0C;<script type="math/tex; ">(4, 5)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">4</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">5</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x805A;&#x7C7B;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x4F46;&#x53C2;&#x8003;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">1</script></strong>)&#xFF0C;<script type="math/tex; ">(4, 6)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">4</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">6</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x805A;&#x7C7B;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x4F46;&#x53C2;&#x8003;&#x7C07;&#x90FD;&#x4E3A;<script type="math/tex; ">1</script></strong>)&#x3002;&#x603B;&#x5171;&#x6709;<script type="math/tex; ">4</script>&#x4E2A;&#x6837;&#x672C;&#x5BF9;&#x6EE1;&#x8DB3;<script type="math/tex; ">c</script>&#xFF0C;&#x56E0;&#x6B64;<script type="math/tex; ">c=4</script>&#x3002;</p>
<p>&#x6EE1;&#x8DB3;<script type="math/tex; ">d</script>&#x7684;&#x6837;&#x672C;&#x5BF9;&#x4E3A;<script type="math/tex; ">(1, 4)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">1</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">4</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(1, 5)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">1</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">5</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(1, 6)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">1</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">6</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(2, 4)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">2</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">4</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(2, 5)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">2</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">5</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(2, 6)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">2</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">6</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(3, 5)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">3</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">5</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#xFF0C;<script type="math/tex; ">(3, 6)</script>(<strong>&#x56E0;&#x4E3A;<script type="math/tex; ">3</script>&#x53F7;&#x6837;&#x672C;&#x4E0E;<script type="math/tex; ">6</script>&#x53F7;&#x6837;&#x672C;&#x7684;&#x53C2;&#x8003;&#x7C07;&#x4E0D;&#x540C;&#xFF0C;&#x805A;&#x7C7B;&#x7C07;&#x4E5F;&#x4E0D;&#x540C;</strong>)&#x3002;&#x603B;&#x5171;&#x6709;<script type="math/tex; ">8</script>&#x4E2A;&#x6837;&#x672C;&#x5BF9;&#x6EE1;&#x8DB3;<script type="math/tex; ">d</script>&#xFF0C;&#x56E0;&#x6B64;<script type="math/tex; ">d=8</script>&#x3002;</p>
<h3 id="jc&#x7CFB;&#x6570;">JC&#x7CFB;&#x6570;</h3>
<p><strong>JC&#x7CFB;&#x6570;</strong>&#x6839;&#x636E;&#x4E0A;&#x9762;&#x6240;&#x63D0;&#x5230;&#x7684;<script type="math/tex; ">a</script>&#xFF0C;<script type="math/tex; ">b</script>&#xFF0C;<script type="math/tex; ">c</script>&#x6765;&#x8BA1;&#x7B97;&#xFF0C;&#x5E76;&#x4E14;&#x503C;&#x57DF;&#x4E3A;<script type="math/tex; ">[0, 1]</script>&#xFF0C;&#x503C;&#x8D8A;&#x5927;&#x8BF4;&#x660E;&#x805A;&#x7C7B;&#x6027;&#x80FD;&#x8D8A;&#x597D;&#xFF0C;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><script type="math/tex; ">
JC=\frac{a}{a+b+c}
</script></p>
<p>&#x56E0;&#x6B64;&#x521A;&#x521A;&#x7684;&#x4F8B;&#x5B50;&#x4E2D;&#xFF0C;<script type="math/tex; ">JC=\frac{2}{2+1+4}=\frac{2}{7}</script></p>
<h3 id="fm&#x6307;&#x6570;">FM&#x6307;&#x6570;</h3>
<p><strong>FM&#x6307;&#x6570;</strong>&#x6839;&#x636E;&#x4E0A;&#x9762;&#x6240;&#x63D0;&#x5230;&#x7684;<script type="math/tex; ">a</script>&#xFF0C;<script type="math/tex; ">b</script>&#xFF0C;<script type="math/tex; ">c</script>&#x6765;&#x8BA1;&#x7B97;&#xFF0C;&#x5E76;&#x4E14;&#x503C;&#x57DF;&#x4E3A;<script type="math/tex; ">[0, 1]</script>&#xFF0C;&#x503C;&#x8D8A;&#x5927;&#x8BF4;&#x660E;&#x805A;&#x7C7B;&#x6027;&#x80FD;&#x8D8A;&#x597D;&#xFF0C;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><script type="math/tex; ">
FMI=\sqrt{\frac{a}{a+b}*\frac{a}{a+c}}
</script></p>
<p>&#x56E0;&#x6B64;&#x521A;&#x521A;&#x7684;&#x4F8B;&#x5B50;&#x4E2D;&#xFF0C;<script type="math/tex; ">FMI=\sqrt{\frac{2}{2+1}*\frac{2}{2+4}}=\sqrt{\frac{4}{18}}</script></p>
<h3 id="rand&#x6307;&#x6570;">Rand&#x6307;&#x6570;</h3>
<p><strong>Rand&#x6307;&#x6570;</strong>&#x6839;&#x636E;&#x4E0A;&#x9762;&#x6240;&#x63D0;&#x5230;&#x7684;<script type="math/tex; ">a</script>&#x548C;<script type="math/tex; ">d</script>&#x6765;&#x8BA1;&#x7B97;&#xFF0C;&#x5E76;&#x4E14;&#x503C;&#x57DF;&#x4E3A;<script type="math/tex; ">[0, 1]</script>&#xFF0C;&#x503C;&#x8D8A;&#x5927;&#x8BF4;&#x660E;&#x805A;&#x7C7B;&#x6027;&#x80FD;&#x8D8A;&#x597D;&#xFF0C;&#x5047;&#x8BBE;<script type="math/tex; ">m</script>&#x4E3A;&#x6837;&#x672C;&#x6570;&#x91CF;&#xFF0C;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><script type="math/tex; ">
RandI=\frac{2(a+d)}{m(m-1)}
</script></p>
<p>&#x56E0;&#x6B64;&#x521A;&#x521A;&#x7684;&#x4F8B;&#x5B50;&#x4E2D;&#xFF0C;<script type="math/tex; ">RandI=\frac{2*(2+8)}{6*(6-1)}=\frac{2}{3}</script>&#x3002;</p>
<h2 id="&#x5185;&#x90E8;&#x6307;&#x6807;">&#x5185;&#x90E8;&#x6307;&#x6807;</h2>
<p><strong>&#x5185;&#x90E8;&#x6307;&#x6807;&#x901A;&#x5E38;&#x4F7F;&#x7528; Davies-Bouldin Index (DB&#x6307;&#x6570;)&#x4EE5;&#x53CA; Dunn Index&#xFF08;Dunn&#x6307;&#x6570;&#xFF09;&#x3002;</strong></p>
<h5 id="db&#x6307;&#x6570;">DB&#x6307;&#x6570;</h5>
<p><strong>DB&#x6307;&#x6570;</strong>&#x53C8;&#x79F0; DBI &#xFF0C;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><script type="math/tex; ">
DBI=\frac{1}{k}\sum_{i=1}^kmax(\frac{avg(C_i)+avg(C_j)}{d_c(\mu_i,\mu_j)}), i \neq j
</script></p>
<p>&#x516C;&#x5F0F;&#x4E2D;&#x7684;&#x8868;&#x8FBE;&#x5F0F;&#x5176;&#x5B9E;&#x5F88;&#x597D;&#x7406;&#x89E3;&#xFF0C;&#x5176;&#x4E2D;<script type="math/tex; ">k</script>&#x4EE3;&#x8868;&#x805A;&#x7C7B;&#x6709;&#x591A;&#x5C11;&#x4E2A;&#x7C07;&#xFF0C;<script type="math/tex; ">\mu_i</script>&#x4EE3;&#x8868;&#x7B2C;<script type="math/tex; ">i</script>&#x4E2A;&#x7C07;&#x7684;&#x4E2D;&#x5FC3;&#x70B9;&#xFF0C;<script type="math/tex; ">avg(C_i)</script>&#x4EE3;&#x8868;<script type="math/tex; ">C_i</script>&#x7B2C;<script type="math/tex; ">i</script>&#x4E2A;&#x7C07;&#x4E2D;&#x6240;&#x6709;&#x6570;&#x636E;&#x4E0E;&#x7B2C;<script type="math/tex; ">i</script>&#x4E2A;&#x7C07;&#x7684;&#x4E2D;&#x5FC3;&#x70B9;&#x7684;&#x5E73;&#x5747;&#x8DDD;&#x79BB;&#x3002;<script type="math/tex; ">d_c(\mu_i, \mu_j)</script>&#x4EE3;&#x8868;&#x7B2C;<script type="math/tex; ">i</script>&#x4E2A;&#x7C07;&#x7684;&#x4E2D;&#x5FC3;&#x70B9;&#x4E0E;&#x7B2C;<script type="math/tex; ">j</script>&#x4E2A;&#x7C07;&#x7684;&#x4E2D;&#x5FC3;&#x70B9;&#x7684;&#x8DDD;&#x79BB;&#x3002;</p>
<p>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF0C;&#x73B0;&#x5728;&#x6709;<script type="math/tex; ">6</script>&#x6761;&#x897F;&#x74DC;&#x6570;&#x636E;<script type="math/tex; ">\{x_1,x_2,...,x_6\}</script>&#xFF0C;&#x8FD9;&#x4E9B;&#x6570;&#x636E;&#x5DF2;&#x7ECF;&#x805A;&#x7C7B;&#x6210;&#x4E86;<script type="math/tex; ">2</script>&#x4E2A;&#x7C07;&#x3002;</p>
<table>
<thead>
<tr>
<th>&#x7F16;&#x53F7;</th>
<th>&#x4F53;&#x79EF;</th>
<th>&#x91CD;&#x91CF;</th>
<th>&#x7C07;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>3</td>
<td>4</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>6</td>
<td>9</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>2</td>
<td>3</td>
<td>1</td>
</tr>
<tr>
<td>4</td>
<td>3</td>
<td>4</td>
<td>1</td>
</tr>
<tr>
<td>5</td>
<td>7</td>
<td>10</td>
<td>2</td>
</tr>
<tr>
<td>6</td>
<td>8</td>
<td>11</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>&#x4ECE;&#x8868;&#x683C;&#x53EF;&#x4EE5;&#x770B;&#x51FA;&#xFF1A;</p>
<p><script type="math/tex; ">
k=2
</script></p>
<p><script type="math/tex; ">
\mu_1=(\frac{(3+2+3)}{3}, \frac{(4+3+4)}{3})=(2.67,3.67)
</script></p>
<p><script type="math/tex; ">
\mu_2=(\frac{(6+7+8)}{3}, \frac{(9+10+11)}{3})=(7,10)
</script></p>
<p><script type="math/tex; ">
d_c(\mu_1, \mu_2)=\sqrt{(2.67-7)^2+(3.67-10)^2}=7.67391
</script></p>
<p><script type="math/tex; ">
avg(C_1)=(\sqrt{(3-2.67)^2+(4-3.67)^2}+\sqrt{(2-2.67)^2+(3-3.67)^2}+\sqrt{(3-2.67)^2+(4-3.67)^2})/3=0.628539
</script></p>
<p><script type="math/tex; ">
avg(C_2)=(\sqrt{(6-7)^2+(9-10)^2}+\sqrt{(7-7)^2+(10-10)^2}+\sqrt{(8-7)^2+(11-10)^2})/3=0.94281
</script></p>
<p>&#x56E0;&#x6B64;&#x6709;&#xFF1A;</p>
<p><script type="math/tex; ">
DBI=\frac{1}{k}\sum_{i=1}^kmax(\frac{avg(C_i)+avg(C_j)}{d_c(\mu_i,\mu_j)})=0.204765
</script></p>
<p><strong>DB&#x6307;&#x6570;&#x8D8A;&#x5C0F;&#x5C31;&#x8D8A;&#x5C31;&#x610F;&#x5473;&#x7740;&#x7C07;&#x5185;&#x8DDD;&#x79BB;&#x8D8A;&#x5C0F;&#x540C;&#x65F6;&#x7C07;&#x95F4;&#x8DDD;&#x79BB;&#x8D8A;&#x5927;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;DB&#x6307;&#x6570;&#x8D8A;&#x5C0F;&#x8D8A;&#x597D;&#x3002;</strong></p>
<h3 id="dunn&#x6307;&#x6570;">Dunn&#x6307;&#x6570;</h3>
<p><strong>Dunn&#x6307;&#x6570;</strong>&#x53C8;&#x79F0;DI&#xFF0C;&#x8BA1;&#x7B97;&#x516C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><script type="math/tex; ">
DI=min_{1\leq i\leq k}\{min_{i\neq j}(\frac{d_min(C_i,C_j)}{max_{1\leq l\leq k}diam(C_l)})\}
</script></p>
<p>&#x516C;&#x5F0F;&#x4E2D;&#x7684;&#x8868;&#x8FBE;&#x5F0F;&#x5176;&#x5B9E;&#x5F88;&#x597D;&#x7406;&#x89E3;&#xFF0C;&#x5176;&#x4E2D;<script type="math/tex; ">k</script>&#x4EE3;&#x8868;&#x805A;&#x7C7B;&#x6709;&#x591A;&#x5C11;&#x4E2A;&#x7C07;&#xFF0C;<script type="math/tex; ">d_{min}(C_i,C_j)</script>&#x4EE3;&#x8868;&#x7B2C;<script type="math/tex; ">i</script>&#x4E2A;&#x7C07;&#x4E2D;&#x7684;&#x6837;&#x672C;&#x4E0E;&#x7B2C;<script type="math/tex; ">j</script>&#x4E2A;&#x7C07;&#x4E2D;&#x7684;&#x6837;&#x672C;&#x4E4B;&#x95F4;&#x7684;&#x6700;&#x77ED;&#x8DDD;&#x79BB;&#xFF0C;<script type="math/tex; ">diam(C_l)</script>&#x4EE3;&#x8868;&#x7B2C;<script type="math/tex; ">l</script>&#x4E2A;&#x7C07;&#x4E2D;&#x76F8;&#x8DDD;&#x6700;&#x8FDC;&#x7684;&#x6837;&#x672C;&#x4E4B;&#x95F4;&#x7684;&#x8DDD;&#x79BB;&#x3002;</p>
<p>&#x8FD8;&#x662F;&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;&#xFF0C;&#x73B0;&#x5728;&#x6709; 6 &#x6761;&#x897F;&#x74DC;&#x6570;&#x636E;<script type="math/tex; ">\{x_1,x_2,...,x_6\}</script>&#xFF0C;&#x8FD9;&#x4E9B;&#x6570;&#x636E;&#x5DF2;&#x7ECF;&#x805A;&#x7C7B;&#x6210;&#x4E86; 2 &#x4E2A;&#x7C07;&#x3002;</p>
<table>
<thead>
<tr>
<th>&#x7F16;&#x53F7;</th>
<th>&#x4F53;&#x79EF;</th>
<th>&#x91CD;&#x91CF;</th>
<th>&#x7C07;</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>3</td>
<td>4</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>6</td>
<td>9</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>2</td>
<td>3</td>
<td>1</td>
</tr>
<tr>
<td>4</td>
<td>3</td>
<td>4</td>
<td>1</td>
</tr>
<tr>
<td>5</td>
<td>7</td>
<td>10</td>
<td>2</td>
</tr>
<tr>
<td>6</td>
<td>8</td>
<td>11</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>&#x4ECE;&#x8868;&#x683C;&#x53EF;&#x4EE5;&#x770B;&#x51FA;&#xFF1A;</p>
<p><script type="math/tex; ">
k=2
</script></p>
<p><script type="math/tex; ">
d_{min}(C_1,C_2)=\sqrt{(3-6)^2+(4-9)^2}=5.831
</script></p>
<p><script type="math/tex; ">
diam(C_1)=\sqrt{(3-2)^2+(4-2)^2}=1.414
</script></p>
<p><script type="math/tex; ">
diam(C_2)=\sqrt{(6-8)^2+(9-11)^2}=2.828
</script></p>
<p>&#x56E0;&#x6B64;&#x6709;&#xFF1A;</p>
<p><script type="math/tex; ">
DI=min_{1\leq i\leq k}\{min_{i\neq j}(\frac{d_min(C_i,C_j)}{max_{1\leq l\leq k}diam(C_l)})\}=2.061553
</script></p>
<p><strong>Dunn&#x6307;&#x6570;&#x8D8A;&#x5927;&#x610F;&#x5473;&#x7740;&#x7C07;&#x5185;&#x8DDD;&#x79BB;&#x8D8A;&#x5C0F;&#x540C;&#x65F6;&#x7C07;&#x95F4;&#x8DDD;&#x79BB;&#x8D8A;&#x5927;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;Dunn&#x6307;&#x6570;&#x8D8A;&#x5927;&#x8D8A;&#x597D;&#x3002;</strong></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="regression_metrics.html" class="navigation navigation-prev " aria-label="Previous page: 回归性能评估指标">
<i class="fa fa-angle-left"></i>
</a>
<a href="sklearn.html" class="navigation navigation-next " aria-label="Next page: 使用sklearn进行机器学习">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"聚类性能评估指标","level":"1.4.3","depth":2,"next":{"title":"使用sklearn进行机器学习","level":"1.5","depth":1,"path":"sklearn.md","ref":"sklearn.md","articles":[]},"previous":{"title":"回归性能评估指标","level":"1.4.2","depth":2,"path":"regression_metrics.md","ref":"regression_metrics.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["mathjax"],"pluginsConfig":{"mathjax":{"forceSVG":false,"version":"2.6-latest"},"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":"cluster_metrics.md","mtime":"2019-07-04T07:52:21.990Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-05T01:10:51.626Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="gitbook/gitbook-plugin-mathjax/plugin.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>