베르누이 혼합 모형

R로 배우는 Mixture Models

Victor Medina

Researcher at The University of Edinburgh

손글씨 숫자 데이터셋

R로 배우는 Mixture Models

연속형 vs 이산형 변수

가우시안 분포

베르누이 분포(동전 던지기)

R로 배우는 Mixture Models

베르누이 분포

  • 가능한 결과 2개
    • "뒷면" 또는 "앞면"
    • "검정" 또는 "흰색"
  • "성공" 확률로 표현 → p
    • (1- p) = 다른 결과의 확률
R로 배우는 Mixture Models

베르누이 분포 샘플

p <- 0.7
bernoulli <- sample(c(0, 1), 100, replace = TRUE, prob = c(1-p, p))
head(bernoulli)
1 1 1 0 0 1
R로 배우는 Mixture Models

베르누이 분포로 본 이진 이미지

R로 배우는 Mixture Models

베르누이 벡터로 본 이진 이미지

R로 배우는 Mixture Models
p1 <- 0.7; p2 <- 0.5; p3 <- 0.4

bernoulli_1 <- sample(c(0, 1), 100, replace = TRUE, prob = c(1-p1, p1))
bernoulli_2 <- sample(c(0, 1), 100, replace = TRUE, prob = c(1-p2, p2))
bernoulli_3 <- sample(c(0, 1), 100, replace = TRUE, prob = c(1-p3, p3))

multi_bernoulli <- cbind(bernoulli_1, bernoulli_2, bernoulli_3)

head(multi_bernoulli, 4)
     bernoulli_1 bernoulli_2 bernoulli_3
[1,]           1           0           0
[2,]           0           0           0
[3,]           0           0           1
[4,]           1           0           0
p_vector <- c(p1, p2, p3)
R로 배우는 Mixture Models

베르누이 혼합 모형

손글씨 숫자 데이터셋:

  1. 적합한 확률분포는?
    • (다변량) 베르누이 분포
  2. 하위 집단은 몇 개로 볼까요?
    • 두 개로 가정. 크기 256의 이진 벡터 2개
  3. 모수와 추정치는?
    • 각 이진 벡터의 p, 그리고 두 혼합 비율
R로 배우는 Mixture Models

Ayo berlatih!

R로 배우는 Mixture Models

Preparing Video For Download...