当前位置:网站首页>吴恩达《机器学习》课程总结(13)_聚类
吴恩达《机器学习》课程总结(13)_聚类
2022-06-27 21:36:00 【51CTO】
13.1无监督学习:简介
将没有标签的样本分成不同的集合(簇),这种算法叫做聚类。常用的领域有市场分割、社交网络分析、计算机集群管理、了解星系等。
13.2K-均值算法
(1)K-均值是最普及的聚类算法,是一种迭代算法,假设需要将数据聚类成n个组,这时候首先随机选择K个点,称为聚类中心。
将每个样本归属到最近的聚类中心,然后重新计算每个类的中心变成新的聚类中心,重复以上步骤,直到聚类中心不变。


伪代码如下:

13.3优化目标
k-均值的最小化问题,就是每个样本点到对应聚类中心的距离之和:

与其他算法不同的是,k-均值每一次迭代都会是代价函数变小。
13.4随机初始化
(1)K应该小于样本数m;
(2)从样本中随机选取K个实例作为初始聚类中心。
K-均值可能会出现局部最小的情况,如下所示:

解决方案:多次运行该算法,最后在比较K-均值代价函数最小的结果,这种方法适用于K取较小的时候(2-10),K太大没有明显效果。
13.5选择聚类数
绘制聚类数与代价函数的图,然后选取出现斜率突然变小的地方的值(“肘部法则”)。


作者:你的雷哥
本文版权归作者所有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。
边栏推荐
- What if Fiddler fails to listen to the interface
- Local visualization tool connects to redis of Alibaba cloud CentOS server
- 表单form 和 表单元素(input、select、textarea等)
- 线程池实现:信号量也可以理解成小等待队列
- [digital ic/fpga] detect the position of the last matching sequence
- ASP. Net warehouse purchase, sales and inventory ERP management system source code ERP applet source code
- 用两个栈实现队列[两次先进后出便是先进先出]
- MySQL企业级参数调优实践分享
- Solve the cross domain problem of the new version of chrome: Cookie loss and samesite attribute problem "recommended collection"
- 文献综述如何挑选文献进行阅读,比如我的检索结果有200多篇根本看不完,如何进行文献挑选呢?...
猜你喜欢

一文剖析C语言函数

MySQL企业级参数调优实践分享

零基础自学SQL课程 | IF函数
![[digital ic/fpga] detect the position of the last matching sequence](/img/67/a1b575aa9b63892ed585d39e615c58.png)
[digital ic/fpga] detect the position of the last matching sequence

Zero foundation self-study SQL course | if function

c语言字符指针、字符串初始化问题

Sécurité, économie de carburant et protection de l'environnement chameau

Windows环境下的ELK——Logstash+Mysql(4)

【tinyriscv verilator】分支移植到正点原子达芬奇开发板

Zero foundation self-study SQL course | complete collection of date functions in SQL
随机推荐
Count prime [enumeration - > space for time]
Structure de stockage des graphiques
Webserver flow chart -- understand the calling relationship between webserver modules
SQL中IS NOT NULL与!=NULL的区别
吴恩达《机器学习》课程总结(14)_降维
[AI application] detailed parameters of NVIDIA Tesla v100-pcie-32gb
How to select documents for literature review? For example, I can't finish reading more than 200 search results. How to select documents
const关键字及其作用(用法),C语言const详解
[PCL self study: pclvisualizer] point cloud visualization tool pclvisualizer
内网IP和公网IP的区别及作用
After a period of silence, I came out again~
Instructions for vivado FFT IP
What if Fiddler fails to listen to the interface
[AI application] detailed parameters of NVIDIA geforce RTX 1080ti
零基础自学SQL课程 | CASE函数
华泰证券在网上开户安全吗?
Google Earth Engine(GEE) 03-矢量数据类型
Detailed explanation of MATLAB axis coordinate axis related settings
表单form 和 表单元素(input、select、textarea等)
Smart wind power | Tupu software digital twin wind turbine equipment, 3D visual intelligent operation and maintenance