單變量高斯混合模型

R 中的混合模型

Victor Medina

Researcher at The University of Edinburgh

gender %>% head()
  Gender   Height   Weight        BMI
1   Male 73.84702 241.8936 0.04435662
2   Male 68.78190 162.3105 0.03430822
3   Male 74.11011 212.7409 0.03873433
4   Male 71.73098 220.0425 0.04276545
5   Male 69.88180 206.3498 0.04225479
6   Male 67.25302 152.2122 0.03365316
gender %>% select(-Gender) %>% head()
    Height   Weight        BMI
1 73.84702 241.8936 0.04435662
2 68.78190 162.3105 0.03430822
3 74.11011 212.7409 0.03873433
4 71.73098 220.0425 0.04276545
5 69.88180 206.3498 0.04225479
6 67.25302 152.2122 0.03365316
R 中的混合模型

以混合模型建模

  1. 適合的機率分佈是什麼?
  2. 要考慮多少個子族群?
  3. 參數有哪些?如何估計?
R 中的混合模型
head(gender %>% select(-Gender))
    Height   Weight        BMI
1 73.84702 241.8936 0.04435662
2 68.78190 162.3105 0.03430822
3 74.11011 212.7409 0.03873433
4 71.73098 220.0425 0.04276545
5 69.88180 206.3498 0.04225479
6 67.25302 152.2122 0.03365316
head(gender %>% select(Weight))
    Weight
1 241.8936
2 162.3105
3 212.7409
4 220.0425
5 206.3498
6 152.2122
R 中的混合模型
gender %>% 
  ggplot(aes(x = Weight)) + geom_histogram(bins = 100)

R 中的混合模型

選哪種分佈?

長條圖

高斯分佈

R 中的混合模型

有幾個叢集?

R 中的混合模型

參數與估計方法是什麼?

有哪些參數?

  • 兩個平均數
  • 兩個標準差
  • 兩個比例

如何估計?

  • flexmix 中的 EM 演算法

R 中的混合模型

一起來練習吧!

R 中的混合模型

Preparing Video For Download...