Description Usage Arguments Value Author(s) Examples
View source: R/NesterovInitialize.R
Performs Nesterov initialization where an initial parameter value is found by performing a preliminary number of Nesterov steps.
1 2 | NesterovInitialize(par, fixptfn, objfn = NULL, test = "monotone", ...,
control = list(maxiter = 500))
|
par |
The initial parameter vector |
fixptfn |
The fixed point function which performs the basic parameter update. |
objfn |
The objective function of interest. |
test |
The test which determines termination of the Nesterov iterations. Can be either "monotone" or "gradient". |
... |
Additional arguments that may be needed by |
control |
A list of additional control parameters |
A list with the following components
par |
Initial value of the parameter vector |
value.obj |
value of objective function at termination |
objfn.val |
values of the objective function at each iteration |
num.iter |
number of fixed-point updates performed |
Nicholas Henderson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | n <- 1000
p <- 100
beta.coef <- rt(p, df=2)
XX <- matrix(rnorm(n*p), nrow=n, ncol=p)
yy <- XX%*%beta.coef + rnorm(n)
VV <- eigen(crossprod(XX))
LL <- max(VV$values)
ne.mon <- NesterovInitialize(par=rep(0, p), fixptfn=GDLassoStep, objfn = LassoObjFn,
test = "monotone", X=XX, y=yy, lambda=.0001,
stplngth=1/LL)
ne.grad <- NesterovInitialize(par=rep(0, p), fixptfn=GDLassoStep, objfn = LassoObjFn,
test = "gradient", X=XX, y=yy, lambda=.0001,
stplngth=1/LL)
ne.mon$num.iter
ne.grad$num.iter
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.