Title: | Variable Selection for Clustering and Classification |
---|---|
Description: | Performs variable selection/feature reduction under a clustering or classification framework. In particular, it can be used in an automated fashion using mixture model-based methods ('teigen' and 'mclust' are currently supported). Can account for mixtures of non-Gaussian distributions via Manly transform (via 'ManlyMix'). See Andrews and McNicholas (2014) <doi:10.1007/s00357-013-9139-2> and Neal and McNicholas (2023) <doi:10.48550/arXiv.2305.16464>. |
Authors: | Jeffrey L. Andrews [aut], Mackenzie R. Neal [aut], Paul D. McNicholas [aut, cre] |
Maintainer: | Paul D. McNicholas <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.7 |
Built: | 2024-12-11 07:15:21 UTC |
Source: | CRAN |
Performs variable selection under a clustering or classification framework. Automated implementation using model-based clustering is based on teigen
and mclust
.
Package: | vscc |
Type: | Package |
Version: | 0.7 |
Date: | 2023-10-17 |
License: | GPL>="2" |
Jeffrey L. Andrews, Mackenzie Neal, Paul D. McNicholas
Maintainer: Paul D. McNicholas <[email protected]>
See citation("vscc")
.
Dedicated plot function for objects of class vscc.
## S3 method for class 'vscc' plot(x, ...)
## S3 method for class 'vscc' plot(x, ...)
x |
An object of class vscc. |
... |
Further arguments to be passed on |
Provides a scatterplot matrix of the selected variables with colours corresponding to each group.
No return value.
Jeffrey L. Andrews
require("mclust") data(banknote) X<-banknote[,-1] bankrun <- vscc(X) plot(bankrun)
require("mclust") data(banknote) X<-banknote[,-1] bankrun <- vscc(X) plot(bankrun)
Dedicated print function for objects of class vscc.
## S3 method for class 'vscc' print(x, ...)
## S3 method for class 'vscc' print(x, ...)
x |
An object of class vscc |
... |
Further arguments to be passed on |
Same as summary.
No return value.
Jeffrey L. Andrews
require("mclust") data(banknote) X<-banknote[,-1] vscc(X)
require("mclust") data(banknote) X<-banknote[,-1] vscc(X)
Dedicated summary function for objects of class vscc
## S3 method for class 'vscc' summary(object, ...)
## S3 method for class 'vscc' summary(object, ...)
object |
An object of class vscc |
... |
Additional arguments to be passed |
No return value.
Jeffrey L. Andrews
require("mclust") data(banknote) summary(vscc(banknote[,-1]))
require("mclust") data(banknote) summary(vscc(banknote[,-1]))
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)
vscc(x, G=1:9, automate = "mclust", initial = NULL, initunc=NULL, train = NULL, forcereduction = FALSE)
x |
Data frame or matrix to perform variable selection on |
G |
Vector for the number of groups to consider during initialization and/or post-selection analysis. Default is 1-9. |
automate |
Character string ( |
initial |
Optional vector giving the initial clustering. |
initunc |
Optional scalar indicating the total uncertainty of the initial clustering solution. Only used when |
train |
Optional vector of training data (for classification framework). |
forcereduction |
Logical indicating if the full data set should be considered (FALSE) when selecting the ‘best’ variable subset via total model uncertainty. Not used if |
selected |
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, |
family |
The family used as initialization and/or post selection. (Same as user input |
wss |
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
:
topselected |
The best variable subset according to the total model uncertainty. |
initialrun |
Results from the initialization; an object of class |
bestmodel |
Results from the best model on the selected variable subset; an object of class |
chosenrelation |
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 |
uncertainty |
Total model uncertainty associated with the best relationship. |
allmodelfit |
List containing the results ( |
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.
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
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
Performs variable selection under a clustering framework. Accounts for mixtures of non-Gaussian distributions via the ManlyTransform (via 'ManlyMix').
vsccmanly(x, G=2:9, numstart=100, selection="backward",forcereduction=FALSE, initstart="k-means", seedval=2354)
vsccmanly(x, G=2:9, numstart=100, selection="backward",forcereduction=FALSE, initstart="k-means", seedval=2354)
x |
Data frame or matrix to perform variable selection on |
G |
Vector for the number of groups to consider during initialization and/or post-selection analysis. Default is 2-9. |
numstart |
Number of random starts. |
selection |
Forward or backward transformation parameter selection. User may also choose to fit a full Manly mixture (options are 'forward', 'backward', or 'none'). |
forcereduction |
Logical indicating if the full data set should be considered (FALSE) when selecting the ‘best’ variable subset via total model uncertainty. |
initstart |
Method for initial starting values (options are 'k-means' or 'hierarchical'). |
seedval |
Value of seed, used for k-means initialization. |
selected |
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, |
wss |
The within-group variance associated with each variable from the full data set. |
topselected |
The best variable subset according to the total model uncertainty. |
initialrun |
Results from the initial model, prior to variable selection; an object of class |
bestmodel |
Results from the best model on the selected variable subset; an object of class |
variables |
Variables used to fit the final model. |
chosenrelation |
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 |
uncertainty |
Total model uncertainty associated with the best relationship. |
allmodelfit |
List containing the results ( |
Jeffrey L. Andrews, Mackenzie R. Neal, Paul D. McNicholas
See citation("vscc")
for the variable selection references.
## Not run: data(ais) X=ais[,3:13] aisfor=vsccmanly(as.data.frame(scale(X)),G=2:9,selection = "forward", forcereduction = TRUE, initstart = "k-means",seedval=2354) aisfor$variables #Show selected variables table(ais[,1], aisfor$bestmodel$id) #Clustering results on reduced data set ## End(Not run)
## Not run: data(ais) X=ais[,3:13] aisfor=vsccmanly(as.data.frame(scale(X)),G=2:9,selection = "forward", forcereduction = TRUE, initstart = "k-means",seedval=2354) aisfor$variables #Show selected variables table(ais[,1], aisfor$bestmodel$id) #Clustering results on reduced data set ## End(Not run)