Description Usage Arguments Details Value Author(s) References See Also Examples

Fit a regularized generalized linear model via penalized maximum likelihood. The model is fit for a path of values of the penalty parameter. Fits linear and logistic models.

1 2 3 |

`data` |
A list with components $x$, an input matrix of dimension $(n,p)$, and $y$, a response vector of length $n$. For |

`index` |
A $p$-vector indicating group membership of each covariate |

`weights` |
Optional vector of weights for the group penalties |

`type` |
Model type: "linear" or "logit" |

`alphas` |
Vector of mixing parameters. The value 1 yields the lasso penalty. The value 0 yields the group lasso penalty. |

`nlam` |
Number of lambda values to use in the regularization path |

`standardize` |
Logical flag for variable standardization prior to fitting the model. |

`maxit` |
Maximum number of iterations to convergence |

`thresh` |
Convergence threshold for change in beta |

`min.frac` |
Minimum value of the penalty parameter, as a fraction of the maximum value |

`gamma` |
Fitting parameter used for tuning backtracking (between 0 and 1) |

`step` |
Fitting parameter used for initial backtracking step size (between 0 and 1) |

`reset` |
Fitting parameter used for taking advantage of local strong convexity in Nesterov momentum (number of iterations before momentum term is reset) |

`lambdas` |
Optional sequence of lambda values for fitting. We recommend leaving this NULL and letting SGL self-select values |

The sequence of models along the regularization path is fit by accelerated generalized gradient descent. If specified, argument `weights`

should be a vector whose length is the number of groups. By default, `weights`

is set to the square root of group sizes.

A single object of class `"creNet"`

or a list of such objects if `alphas`

has length >1.
For each value in `alphas`

, the result has components:

`beta` |
A p by |

`lambdas` |
The actual sequence of |

`type` |
Response type (logistic/linear) |

`intercept` |
For some model types, an intercept is fit |

`X.transform` |
A list used in |

`lambdas` |
The sequence of lambda values used for fitting |

Kourosh Zarringhalam and David Degras

Modified from SGL package: Noah Simon, Jerome Friedman, Trevor Hastie, and Rob Tibshirani

Maintainer: Kourosh Zarringhalam <[email protected]>

Simon, N., Friedman, J., Hastie, T., and Tibshirani, R. (2011)
*A Sparse-Group Lasso*,

http://web.stanford.edu/~hastie/Papers/SGLpaper.pdf

1 2 3 4 5 6 7 8 9 10 11 | ```
n = 50; p = 100; size.groups = 10
index <- ceiling(1:p / size.groups)
X = matrix(rnorm(n * p), ncol = p, nrow = n)
beta = (-2:2)
y = X[,1:5] %*% beta + 0.1*rnorm(n)
y = ifelse((exp(y) / (1 + exp(y))) > 0.5, 1, 0)
data = list(x = X, y = y)
weights = rep(1, size.groups)
fit = creSGL(data, index, weights, type = "linear", maxit = 1000, thresh = 0.001,
min.frac = 0.05, nlam = 100, gamma = 0.8, standardize = TRUE, verbose = FALSE,
step = 1, reset = 10, alphas = 0.05, lambdas = NULL)
``` |

kouroshz/creNet documentation built on Feb. 25, 2018, 12:41 p.m.

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.