当前位置:网站首页>吴恩达《机器学习》课程总结(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选择聚类数
绘制聚类数与代价函数的图,然后选取出现斜率突然变小的地方的值(“肘部法则”)。


作者:你的雷哥
本文版权归作者所有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。
边栏推荐
- webService
- 【论文阅读|深读】SDNE:Structural Deep Network Embedding
- Build an open source and beautiful database monitoring system -lepus
- 超纲练习题不超纲
- ValidateRequest=”false” 是做什么的「建议收藏」
- N methods for obtaining effective length of genes
- 积分体系和营销活动结合在一起有哪些玩法
- 【AI应用】NVIDIA Tesla V100S-PCIE-32GB的详情参数
- Pat class B 1013
- 虽然TCGA数据库有33种癌症
猜你喜欢
Does the subscription of Siyuan notes stop deleting cloud data directly?

webService

MySQL企业级参数调优实践分享
![[PCL self study: segmentation4] point cloud segmentation based on Min cut](/img/af/a6c5abf357c1db0718df505499df70.png)
[PCL self study: segmentation4] point cloud segmentation based on Min cut
![[tinyriscv verilator] branch transplanted to Da Vinci development board of punctual atom](/img/a8/4786e82d0646b08c195dd0a17af227.png)
[tinyriscv verilator] branch transplanted to Da Vinci development board of punctual atom

圖的存儲結構

Chenyun pytorch learning notes_ Build RESNET with 50 lines of code

图的存储结构

零基础自学SQL课程 | SQL中的日期函数大全

【PCL自学:PCLPlotter】PCLPlotter绘制数据分析图
随机推荐
How to solve the problem that the browser developed with CeF3 does not support flash
golang使用mongo-driver操作——查(数组相关)
【论文阅读|深读】SDNE:Structural Deep Network Embedding
本地可视化工具连接阿里云centOS服务器的redis
MySQL character set
Transmitting and receiving antenna pattern
golang使用mongo-driver操作——查(进阶)
【tinyriscv verilator】分支移植到正点原子达芬奇开发板
Windows环境下的ELK——Logstash+Mysql(4)
Google Earth Engine(GEE) 03-矢量数据类型
The file or assembly 'cefsharp.core.runtime.dll' or one of its dependencies could not be loaded. Is not a valid Win32 Application. (exception from hresult:0x800700c1)
Solve the cross domain problem of the new version of chrome: Cookie loss and samesite attribute problem "recommended collection"
[AI application] detailed parameters of NVIDIA geforce RTX 3060
Sell notes | brief introduction to video text pre training
线程池实现:信号量也可以理解成小等待队列
表单form 和 表单元素(input、select、textarea等)
MySQL enterprise parameter tuning practice sharing
超纲练习题不超纲
Course strategy sharing plan of Zhejiang University
Storage structure of graph