Learn R Programming

rebmix (version 2.10.2)

RCLRMIX-methods: Predicts Cluster Membership Based Upon a Model Trained by REBMIX

Description

Returns as default the RCLRMIX algorithm output for mixtures of conditionally independent normal, lognormal, Weibull, gamma, binomial, Poisson, Dirac or von Mises component densities, following the methodology proposed in the article cited in the references. If model equals "RCLRMVNORM" output for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices is returned.

Usage

# S4 method for RCLRMIX
RCLRMIX(model = "RCLRMIX", x = NULL, pos = 1, Zt = factor(), ...)
## ... and for other signatures
# S4 method for RCLRMIX
summary(object, ...)
## ... and for other signatures

Arguments

model

see Methods section below.

x

an object of class REBMIX.

pos

a desired row number in x@summary to be clustered. The default value is 1.

Zt

a factor of true cluster membership. The default value is factor().

object

see Methods section below.

currently not used; additional arguments affecting the summary produced.

Value

Returns an object of class RCLRMIX or RCLRMVNORM.

Methods

signature(model = "RCLRMIX")

a character giving the default class name "RCLRMIX" for mixtures of conditionally independent normal, lognormal, Weibull, gamma, binomial, Poisson, Dirac or von Mises component densities.

signature(model = "RCLRMVNORM")

a character giving the class name "RCLRMVNORM" for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices.

signature(object = "RCLRMIX")

an object of class RCLRMIX.

signature(object = "RCLRMVNORM")

an object of class RCLRMVNORM.

References

J. P. Baudry, A. E. Raftery, G. Celeux, K. Lo and R. Gottardo. Combining mixture components for clustering. Journal of Computational and Graphical Statistics, 19(2):332-353, 2010. http://dx.doi.org/10.1198/jcgs.2010.08111

Examples

Run this code
# NOT RUN {
devAskNewPage(ask = TRUE)

# Generate Poisson dataset.

n <- c(500, 200, 400)

Theta <- list(pdf1 = "Poisson",
  theta1.1 = 3,
  theta2.1 = NA,
  pdf2 = "Poisson",
  theta1.2 = 12,
  theta2.2 = NA,
  pdf3 = "Poisson",
  theta1.3 = 36,
  theta2.3 = NA)

poisson <- RNGMIX(Dataset.name = "Poisson_1", n = n, Theta = Theta)

# Estimate number of components, component weights and component parameters.

poissonest <- REBMIX(Dataset = poisson@Dataset,
  Preprocessing = "histogram",
  cmax = 6,
  Criterion = "BIC",
  pdf = rep("Poisson", 1),
  K = 1)

summary(poissonest)

# Plot finite mixture.

plot(poissonest)

# Cluster dataset.

poissonclu <- RCLRMIX(x = poissonest, Zt = poisson@Zt)

summary(poissonclu)

# Plot clusters.

plot(poissonclu)

summary(poissonclu)
# }

Run the code above in your browser using DataLab