Description Usage Arguments Value Author(s) References See Also Examples
This function implements the variable selection in discriminant analysis using a lasso ranking on the variables as described in Sedki et al (2014). The variable ranking step uses the penalized EM algorithm of Zhou et al (2009) (adapted in Sedki et al (2014) for the discriminant analysis settings). A testing sample can be used to compute the averaged classification error rate.
1 2 | SelvarLearnLasso(data, knownlabels, lambda, rho, hybrid.size, models,
regModel, indepModel, dataTest, labelsTest, nbCores)
|
data |
matrix containing quantitative data. Rows correspond to observations and columns correspond to variables |
knownlabels |
an integer vector or a factor of size number of observations. Each cell corresponds to a cluster affectation |
lambda |
numeric listing of tuning parameter for \ell_1 mean penalty |
rho |
numeric listing of tuning parameter for \ell_1 precision matrix penalty |
hybrid.size |
optional parameter make less strength the hybrid forward and backward algorithms to select S and W sets |
models |
a Rmixmod [ |
regModel |
list of character defining the covariance matrix form for the linear regression of U on the R set of variable. Possible values: "LI" for spherical form, "LB" for diagonal form and "LC" for general form. Possible values: "LI", "LB", "LC", c("LI", "LB") , c("LI", "LC"), c("LB", "LC") and c("LI", "LB", "LC"). Default is c("LI", "LB", "LC") |
indepModel |
list of character defining the covariance matrix form for independent variables W. Possible values: "LI" for spherical form and "LB" for diagonal form. Possible values: "LI", "LB", c("LI", "LB"). Default is c("LI", LB") |
dataTest |
matrix containing quantitative testing data. Rows correspond to observations and columns correspond to variables |
labelsTest |
an integer vector or a factor of size number of testing observations. Each cell corresponds to a cluster affectation |
nbCores |
number of CPUs to be used when parallel computing is utilized (default is 2) |
S |
The selected set of relevant clustering variables |
R |
The selected subset of regressors |
U |
The selected set of redundant variables |
W |
The selected set of independent variables |
criterionValue |
The criterion value for the selected model |
nbCluster |
The selected number of clusters |
model |
The selected covariance model |
regModel |
The selected covariance form for the regression |
indepModel |
The selected covariance form for the independent variables |
proba |
Optional : matrix containing the conditional probabilities of belonging to each cluster for the testing observations |
partition |
Optional: vector containing the cluster assignments of the testing observations according to the Maximum-a-Posteriori rule |
error |
Optional : error rate done by the predicted partition (obtained using Maximum-A-Posteriori rule) |
Mohammed Sedki <mohammed.sedki@u-psud.fr>
Zhou, H., Pan, W., and Shen, X., 2009. "Penalized model-based clustering with unconstrained covariance matrices". Electronic Journal of Statistics, vol. 3, pp.1473-1496.
Maugis, C., Celeux, G., and Martin-Magniette, M. L., 2009. "Variable selection in model-based clustering: A general variable role modeling". Computational Statistics and Data Analysis, vol. 53/11, pp. 3872-3882.
Sedki, M., Celeux, G., Maugis-Rabusseau, C., 2014. "SelvarMix: A R package for variable selection in model-based clustering and discriminant analysis with a regularization approach". Inria Research Report available at http://hal.inria.fr/hal-01053784
SelvarClustLasso SortvarLearn SortvarClust scenarioCor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
## Simulated data example as shown in Sedki et al (2014)
require(Rmixmod)
require(glasso)
data(scenarioCor)
lambda <- seq(20, 50, length = 10)
rho <- seq(1, 2, length=2)
hybrid.size <- 3
models <- mixmodGaussianModel(family = "spherical", equal.proportions = TRUE)
regModel <- c("LI","LB","LC")
indepModel <- c("LI","LB")
## variables selection in discriminant analysis
## training sample : n = 1900 observations , p = 14 variables
data.learn <- scenarioCor[1:1900,1:14]
labels.learn <-scenarioCor[1:1900,15]
## testing sample : n = 100 observations, p = 14 variables
data.test <- scenarioCor[1901:2000,1:14]
labels.test <-scenarioCor[1901:2000,15]
simulate.da <- SelvarLearnLasso(data.learn, labels.learn, lambda, rho, hybrid.size,
models, regModel, indepModel, data.test, labels.test)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.