Stanford ML - Lecture 9 - Clustering

本文介绍了无监督学习的基础概念,重点讲解了K-means算法的工作原理及其优化目标,并探讨了如何选择合适的聚类数量。此外还对比了有监督学习与无监督学习的不同应用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Unsupervised learning introduction

  • supervised learning - training set: 
  • unpervised learning - training set: 

2. K-means algorithm

  • randomly select K cluster centroids
  • repeat
    • for every example, select the closest centroid to it
    • update the new centroid

3. Optimization objective


4. Random initialization

  • randomly initialize K-means algorithm many times, e.g. 100 times, compare the optimization objective function, pick the lowest cost

5. Choosing the number of clusters

  • elbow method
    • select the break point

有监督学习最常见的是regression & classification
无监督学习包括density estimation & clustering
  • PCA和很多deep learning算法都属于无监督学习
回归问题中有可能因为学习率设置过大产生随着迭代次数增加,cost function反倒增大的情况。但聚类是不会产生这样的问题的,因为每一次聚类都保证了使J下降,且无学习率做参数。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值