The generalized beta responsibility of a Gaussian Mixture Model (GMM) is \(\gamma_{i, k}(\beta) = \dfrac{\lambda_k N(x_i \mid \mu_k, \Sigma_k)}{f(x_i; \theta)^{1 - \beta}}\). When `beta = 0`, \(\gamma_{i, k}(0) = \Pr(Z_{k} = 1 \mid x_i)\).

beta_responsibility(x, lambda, mu, sigma, beta)

Arguments

x

`numeric(n)` A vector with n observations from a Gaussian Mixture Model.

lambda

`numeric` - Vector of mixing proportions of each normal component

mu

`numeric` - Vector of means of each normal component

sigma

`numeric` - Vector of standard deviations of each normal component

beta

`numeric(1)` - parameter corresponds to the beta-divergence induced likelihood.

Value

`matrix` A matrix with n rows and k columns representing the generalized responsibilities.

Examples

set.seed(42)
lambda <- c(0.25, 0.75)
mu <- c(0, 4)
sigma <- c(1, 1)
x <- rnormix(n=4, lambda, mu, sigma)
beta_responsibility(x, lambda, mu, sigma, beta=0)
#>              [,1]       [,2]
#> [1,] 9.191751e-03 0.99080825
#> [2,] 9.232057e-05 0.99990768
#> [3,] 9.559612e-01 0.04403885
#> [4,] 6.853953e-01 0.31460471
beta_responsibility(x, lambda, mu, sigma, beta=0.2)
#>              [,1]       [,2]
#> [1,] 6.403311e-03 0.69023337
#> [2,] 7.251055e-05 0.78534884
#> [3,] 5.551826e-01 0.02557594
#> [4,] 3.687813e-01 0.16927507