Skip to Content
精通機器學習
book

精通機器學習

by Aurélien Géron
April 2020
Intermediate to advanced
816 pages
18h 32m
Chinese
GoTop Information, Inc.
Content preview from 精通機器學習
264
|
第九章:無監督學習技術
最小值
9-21 
各種群聚數量的
AIC
BIC
貝氏高斯混合模型
你不需要手動搜尋最佳群聚數量
只要使用
BayesianGaussianMixture
類別即可
它可以
將沒必要的群聚的權重設為零
或接近零
)。
將群聚數量
n_components
設成比最佳群聚數
量更大的值之後
假設你已經稍微瞭解眼前的問題
並且有充分的理由
),
這個演算法
會自動移除沒必要的群聚
例如
我們將群聚數量設為
10
來看看會如何
>>> from sklearn.mixture import
BayesianGaussianMixture
>>>
bgm = BayesianGaussianMixture(n_components=10, n_init=10)
>>>
bgm.fit(X)
>>>
np.round(bgm.weights_, 2)
array([0.4 , 0.21, 0.4 , 0. , 0. , 0. , 0. , 0. , 0. , 0. ])
完美
這個演算法自動發現只有三個群聚是必要的
最後的群聚幾乎與圖
9-17
的一模
一樣
這個模型不會將群聚參數
包括權重
均值與共變異數矩陣
視為固定的模型參數
而是
潛在隨機變數
就像分配群聚那樣
見圖
9-22)。
所以現在
z
包含群聚參數與指派的群聚
Beta
分布經常被用來模擬值在固定範圍之內的隨機變數
在這個例子中
範圍是從
0
1
用範例來解釋
Stick-Breaking
程序
SBP
是最好的做法
假設
Φ
=[0.3, 0.6, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

下一代空间计算:AR与VR创新理论与实践

下一代空间计算:AR与VR创新理论与实践

Erin Pangilinan, Steve Lukas, Vasanth Mohan
C语言核心技术(原书第2版)

C语言核心技术(原书第2版)

Peter Prinz, Tony Crawford

Publisher Resources

ISBN: 9789865024345