EMMIX-methods | R Documentation |
Returns as default the EM algorithm output for mixtures of conditionally independent normal, lognormal, Weibull, gamma,
Gumbel, binomial, Poisson, Dirac or von Mises component densities. If model
equals "REBMVNORM"
output
for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices is returned.
## S4 method for signature 'REBMIX'
EMMIX(model = "REBMIX", Dataset = list(),
Theta = NULL, EMcontrol = NULL, ...)
## ... and for other signatures
model |
see Methods section below. |
Dataset |
a list of length |
Theta |
an object of class |
EMcontrol |
an object of class |
... |
currently not used. |
Returns an object of class REBMIX
or REBMVNORM
.
signature(model = "REBMIX")
a character giving the default class name "REBMIX"
for mixtures of conditionally
independent normal, lognormal, Weibull, gamma, Gumbel, binomial, Poisson, Dirac or von Mises component densities.
signature(model = "REBMVNORM")
a character giving the class name "REBMVNORM"
for mixtures
of multivariate normal component densities with unrestricted variance-covariance matrices.
Branislav Panic
B. Panic, J. Klemenc, M. Nagode. Improved initialization of the EM algorithm for mixture model parameter estimation. Mathematics, 8(3):373, 2020. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/math8030373")}.
## Not run:
devAskNewPage(ask = TRUE)
# Load faithful dataset.
data(faithful)
# Plot faithfull dataset.
plot(faithful)
# Number of dimensions.
d <- ncol(faithful)
# Obtain 2 component solution with Gaussian mixtures.
c <- 2
# Create EMMVNORM.Theta object with new call.
Theta <- new("EMMVNORM.Theta", d = d, c = c)
# Set parameters of Theta.
# Weights.
a.w(Theta) <- c(0.5, 0.5)
# Means.
a.theta1.all(Theta) <- c(2.0, 55.0, 4.5, 80.0)
# Covariances.
a.theta2.all(Theta) <- c(1, 0, 0, 1, 1, 0, 0, 1)
# Run EMMIX method.
model <- EMMIX(model = "REBMVNORM", Dataset = list(faithful), Theta = Theta)
# show.
model
# summary.
summary(model)
# plot.
plot(model, nrow = 3, ncol = 2, what = c("pdf", "marginal pdf", "marginal cdf"))
# Create EMMIX.Theta object with new call.
Theta <- new("EMMIX.Theta", c = c, pdf = c("normal", "normal"))
# Set parameters of Theta.
# Weights.
a.w(Theta) <- c(0.5, 0.5)
# Means.
a.theta1.all(Theta) <- c(2.0, 55.0, 4.5, 80.0)
# Covariances.
a.theta2.all(Theta) <- c(1, 1, 1, 1)
# Run EMMIX method.
model <- EMMIX(Dataset = list(faithful), Theta = Theta)
# show.
model
# summary.
summary(model)
# plot.
plot(model, nrow = 3, ncol = 2, what = c("pdf", "marginal pdf", "marginal cdf"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.