Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gmm

Returns a Gaussian Mixture Model


Description

Returns a Gaussian Mixture Model

Usage

gmm(nComp = NULL, mu = NULL, sigma = NULL, weights = NULL, d = NULL)

Arguments

nComp

(scalar) : number of components

mu

(d by k): mean of each component

sigma

(d by d by k): covariance of each component

weights

(1 by k) : mixing weight of each proportion (optional)

d

: number of dimensions of vector (optional)

Value

model : A Gaussian Mixture Model generated from the given parameters

Examples

# Default 1-d gaussian mixture model
model <- gmm()

# 1-d Gaussian mixture model with 3 components
model <- gmm(nComp = 3)

# 3-d Gaussian mixture model with 3 components, with specified mu,sigma and weights
mu <- matrix(c(1,2,3,2,3,4,5,6,7),ncol=3)
sigma <- array(diag(3),c(3,3,3))
model <- gmm(nComp = 3, mu = mu, sigma=sigma, weights = c(0.2,0.4,0.4), d = 3)

KSD

Goodness-of-Fit Tests using Kernelized Stein Discrepancy

v1.0.1
MIT + file LICENSE
Authors
Min Hyung Kang [aut, cre], Qiang Liu [aut]
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.