| plotLambdaVsQF | R Documentation |
lambda
Given alpha, this function generates a plot of the quality (objective) function across lambda, which is useful to examine how was the "best lambda" value selected.
plotLambdaVsQF(x, alpha.index=NULL, xlab="lambda",
ylab="QF (response vs out-of-bag predicted)", cex.lab=0.95, main=NULL,
col.main="black", cex.main=0.95, log="x", type="b", ...)
x |
|
alpha.index |
Integer indices to select |
xlab |
Custom x-axis label. |
ylab |
Custom y-axis label. |
cex.lab |
Axis label size. |
main |
Custom title. |
col.main |
Title color. |
cex.main |
Title size. |
log |
Log scale axis. |
type |
Plot type. |
... |
Additional plotting parameters. |
By definition, the "best lambda" value for a given alpha is the one that maximizes the quality function (QF) over the range of lambda values considered. Therefore, QF vs lambda distributions with sharp, narrow, well-defined peaks provide more confidence in the selection of the optimal lambda value than those with less-defined peaks. Sometimes, and particularly for the ridge (alpha=0) solutions, QF is observed to increase or decrease monotonically with lambda over its entire range, causing a boundary lambda value to be selected;
we conservatively recommend to disregard alpha-models generated under such circumstances. If interested in investigating further, we suggest to re-run those alpha-models by extending the default range of lambda values (via the argument nlambda.ext) or its density (via the argument nlambda). On occasion, the range of lambda values is effectively limited by convergence issues of the underlying glmnet model; in such scenario, we recommend to increment the maximum allowed number of iterations (via the argument mxit, which is passed on to glmnet.control) or to limit the complexity of the model (e.g. by filtering and reducing the number of features fed into eNetXplorer).
Julian Candia and John S. Tsang
Maintainer: Julian Candia julian.candia@nih.gov
eNetXplorer, plot
data(QuickStartEx)
fit = eNetXplorer(x=QuickStartEx$predictor,y=QuickStartEx$response,
family="gaussian",n_run=20,n_perm_null=10,seed=111)
plot(x=fit,plot.type="lambdaVsQF")
plotLambdaVsQF(x=fit,alpha.index=c(1,3),main="custom title",col.main="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.