Performs variable selection under a clustering or classification framework. Automated implementation using model-based clustering is based on teigen
version 2.0 and mclust
version 4.0; issues *may* arise when using different versions.
vscc(x, G=1:9, automate = "mclust", initial = NULL, initunc=NULL, train = NULL,
forcereduction = FALSE)
A list containing the subsets of variables selected for each relation. Each set is numbered according to the number in the exponential of the relationship. For instance, vscc_object$selected[[3]]
corresponds to the variable subset selected by the cubic relationship.
The family used as initialization and/or post selection. (Same as user input automate
, and can be NULL
).
The within-group variance associated with each variable from the full data set.
The remaining values are provided as long as automate
is not NULL
:
The best variable subset according to the total model uncertainty.
Results from the initialization; an object of class teigen
or mclust
.
Results from the best model on the selected variable subset; an object of class teigen
or mclust
.
Numeric indication of the relationship chosen according to total model uncertainty. The number corresponds to exponent in the relationship: for instance, a value of '4' suggests the quartic relationship. If the value "Full dataset"
is given, then the unreduced data provides the best model uncertainty; can be avoided by specifying forcereduction=TRUE
in the function call.
Total model uncertainty associated with the best relationship.
List containing the results (teigen
or mclust
objects) from the post-selection analysis on each variable subset. Number corresponds to the exponent in the relationship. For instance, vscc_object$allmodelfit[[1]]
gives the results from the analysis on the variables selected by the linear relationship.
Data frame or matrix to perform variable selection on
Vector for the number of groups to consider during initialization and/or post-selection analysis. Default is 1-9.
Character string ("teigen"
, "mclust"
(default), or NULL only) indicating which mixture model family to implement as initialization and/or post-selection analysis. If NULL, the function assumes manual operation of the algorithm (meaning an initial clustering vector must be given, and no post-selection analysis is performed).
Optional vector giving the initial clustering.
Optional scalar indicating the total uncertainty of the initial clustering solution. Only used when initial
is non-null.
Optional vector of training data (for classification framework).
Logical indicating if the full data set should be considered (FALSE) when selecting the `best' variable subset via total model uncertainty. Not used if automate=NULL
.
Jeffrey L. Andrews, Paul D. McNicholas
See citation("vscc")
for the variable selection references. See also citation("teigen")
and citation("mclust")
if using those families of models via the automate
call.
teigen
, Mclust
require("mclust")
data(banknote)
head(banknote)
bankrun <- vscc(banknote[,-1])
head(bankrun$topselected) #Show preview of selected variables
table(banknote[,1], bankrun$initialrun$classification) #Clustering results on full data set
table(banknote[,1], bankrun$bestmodel$classification) #Clustering results on reduced data set
Run the code above in your browser using DataLab