RCLSMIX-methods {rebmix} | R Documentation |
Predicts Class Membership Based Upon a Model Trained by REBMIX
Description
Returns as default the RCLSMIX algorithm output for mixtures of conditionally independent normal, lognormal, Weibull, gamma, Gumbel, binomial, Poisson, Dirac, uniform or von Mises component densities. If model
equals "RCLSMVNORM"
output for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices is returned.
Usage
## S4 method for signature 'RCLSMIX'
RCLSMIX(model = "RCLSMIX", x = list(), Dataset = data.frame(),
Zt = factor(), ...)
## ... and for other signatures
## S4 method for signature 'RCLSMIX'
summary(object, ...)
## ... and for other signatures
Arguments
model |
see Methods section below. |
x |
a list of objects of class |
Dataset |
a data frame containing test dataset |
Zt |
a factor of true class membership |
object |
see Methods section below. |
... |
currently not used. |
Value
Returns an object of class RCLSMIX
or RCLSMVNORM
.
Methods
signature(model = "RCLSMIX")
a character giving the default class name
"RCLSMIX"
for mixtures of conditionally independent normal, lognormal, Weibull, gamma, Gumbel, binomial, Poisson, Dirac, uniform or von Mises component densities.signature(model = "RCLSMVNORM")
a character giving the class name
"RCLSMVNORM"
for mixtures of multivariate normal component densities with unrestricted variance-covariance matrices.signature(object = "RCLSMIX")
an object of class
RCLSMIX
.signature(object = "RCLSMVNORM")
an object of class
RCLSMVNORM
.
Author(s)
Marko Nagode
References
R. O. Duda and P. E. Hart. Pattern Classification and Scene Analysis. John Wiley & Sons, New York, 1973.
Examples
## Not run:
devAskNewPage(ask = TRUE)
data(adult)
# Find complete cases.
adult <- adult[complete.cases(adult),]
# Replace levels with numbers.
adult <- as.data.frame(data.matrix(adult))
# Find numbers of levels.
cmax <- unlist(lapply(apply(adult[, c(-1, -16)], 2, unique), length))
cmax
# Split adult dataset into train and test subsets for two Incomes
# and remove Type and Income columns.
Adult <- split(p = list(type = 1, train = 2, test = 1),
Dataset = adult, class = 16)
# Estimate number of components, component weights and component parameters
# for the set of chunks 1:14.
adultest <- list()
for (i in 1:14) {
adultest[[i]] <- REBMIX(Dataset = a.train(chunk(Adult, i)),
Preprocessing = "histogram",
cmax = min(120, cmax[i]),
Criterion = "BIC",
pdf = "Dirac",
K = 1)
}
# Class membership prediction based upon the best first search algorithm.
adultcla <- BFSMIX(x = adultest,
Dataset = a.test(Adult),
Zt = a.Zt(Adult))
adultcla
summary(adultcla)
# Plot selected chunks.
plot(adultcla, nrow = 5, ncol = 2)
## End(Not run)