Description Usage Arguments Value Author(s) See Also Examples

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

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 | ```
MLGL(
X,
y,
hc = NULL,
lambda = NULL,
weightLevel = NULL,
weightSizeGroup = NULL,
intercept = TRUE,
loss = c("ls", "logit"),
sizeMaxGroup = NULL,
verbose = FALSE,
...
)
MLGL.formula(
formula,
data,
hc = NULL,
lambda = NULL,
weightLevel = NULL,
weightSizeGroup = NULL,
intercept = TRUE,
loss = c("ls", "logit"),
verbose = FALSE,
...
)
``` |

`X` |
matrix of size n*p |

`y` |
vector of size n. If loss = "logit", elements of y must be in -1,1 |

`hc` |
output of |

`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). Only if |

`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. Only if |

`intercept` |
should an intercept be included in the model ? |

`loss` |
a character string specifying the loss function to use, valid options are: "ls" least squares loss (regression) and "logit" logistic loss (classification) |

`sizeMaxGroup` |
maximum size of selected groups. If NULL, no restriction |

`verbose` |
print some information |

`...` |
Others parameters for |

`formula` |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. |

`data` |
an optional data.frame, list or environment (or object coercible by as.data.frame to a data.frame) containing the variables in the model. If not found in data, the variables are taken from environment (formula) |

a MLGL 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

Quentin Grimonprez

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

1 2 3 4 5 6 7 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.