View source: R/msaenet-inspect.R
msaenet.fp | R Documentation |
Get the number of false positive selections from msaenet model objects, given the indices of true variables (if known).
msaenet.fp(object, true.idx)
object |
An object of class |
true.idx |
Vector. Indices of true variables. |
Number of false positive variables in the model.
Nan Xiao <https://nanx.me>
dat <- msaenet.sim.gaussian(
n = 150, p = 500, rho = 0.6,
coef = rep(1, 5), snr = 2, p.train = 0.7,
seed = 1001
)
msaenet.fit <- msaenet(
dat$x.tr, dat$y.tr,
alphas = seq(0.2, 0.8, 0.2),
nsteps = 3L, seed = 1003
)
msaenet.fp(msaenet.fit, 1:5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.