Description Usage Arguments Examples
This function implements CV interaction screening
1 2 3 4 |
x |
|
y |
response |
weights |
Observation weights; defaults to 1 per observation |
offset |
Offset vector (matrix) as in |
lambda |
Optional user-supplied lambda sequence; default is
|
type.measure |
loss to use for cross-validation. Currently five
options, not all available for all models. The default is |
nfolds |
number of folds - default is 10. Although |
foldid |
an optional vector of values between 1 and |
grouped |
This is an experimental argument, with default
|
keep |
If |
parallel |
If |
modifier |
effect modifier |
... |
other arguments to be passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(intscreen)
set.seed(1)
x <- matrix(rnorm(100 * 350), ncol = 350)
y <- rnorm(100) + x[,1] * x[,2] * 0.5 - x[,3] * x[,4] * 0.5
## require that each interaction be in the top 50 ints 100% of the 15 splits
intmod <- cv.intnet(x, y, nints = 50, nsplits = 15, fraction.in.thresh = 1)
plot(intmod)
cfs <- as.matrix(predict(intmod, type = "coef", s = "lambda.min"))
cfs[cfs != 0,,drop=FALSE]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.