HCgglasso: Run hierarchical clustering following by a group-lasso on all...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/HCgglasso.R

Description

Run hierarchical clustering following by a group-lasso on all the different partition.

Usage

1
2
HCgglasso(X, y, hc = NULL, lambda = NULL, weightLevel = NULL,
  weightSizeGroup = NULL, intercept = TRUE, verbose = FALSE, ...)

Arguments

X

matrix of size n*p

y

vector of size n

hc

output of hclust function. If not provided, hclust is run with ward.D2 method

lambda

lambda values for group lasso. If not provided, the function generates its own values of lambda

weightLevel

a vector of size p for each level of the hierarchy. A zero indicates that the level will be ignored. If not provided, use 1/(height between 2 successive levels)

weightSizeGroup

a vector of size 2*p-1 containing the weight for each group. Default is the square root of the size of each group

intercept

should an intercept be included in the model ?

verbose

print some information

...

Others parameters for gglasso function

Value

a HCgglasso object containing :

lambda

lambda values

b0

intercept values for lambda

beta

A list containing the values of estimated coefficients for each values of lambda

var

A list containing the index of selected variables for each values of lambda

group

A list containing the values index of selected groups for each values of lambda

nVar

A vector containing the number of non zero coefficients for each values of lambda

nGroup

A vector containing the number of non zero groups for each values of lambda

structure

A list containing 3 vectors. var : all variables used. group : associated groups. weight : weight associated with the different groups. level : for each group, the corresponding level of the hierarchy where it appears and disappears. 3 indicates the level with a partition of 3 groups.

time

computation time

dim

dimension of X

hc

Output of hierarchical clustering

call

Code executed by user

Author(s)

Quentin Grimonprez

See Also

cv.HCgglasso, stability.HCgglasso, listToMatrix, predict.HCgglasso, coef.HCgglasso, plot.cv.HCgglasso

Examples

1
2
3
4
set.seed(42)
X = simuBlockGaussian(50,12,5,0.7)
y = drop(X[,c(2,7,12)]%*%c(2,2,-2)+rnorm(50,0,0.5))
res = HCgglasso(X,y)

HCgglasso documentation built on May 2, 2019, 4:54 p.m.