screen.FSelector.correlation | R Documentation |
Features are ranked and selected based on the strength of their correlation
with the outcome Y
. Implemented for gaussian()
family only.
screen.FSelector.correlation(
Y,
X,
family,
filter = c("linear.correlation", "rank.correlation"),
selector = c("cutoff.biggest.diff", "cutoff.k", "cutoff.k.percent"),
k = switch(selector, cutoff.k = ceiling(0.5 * ncol(X)), cutoff.k.percent = 0.5, NULL),
verbose = FALSE,
...
)
Y |
Outcome (numeric vector). See |
X |
Predictor variable(s) (data.frame or matrix). See
|
family |
Error distribution to be used in the model:
|
filter |
Character string. One of |
selector |
A string corresponding to a subset selecting function
implemented in the FSelector package. One of:
|
k |
Passed through to the |
verbose |
Should debugging messages be printed? Default: |
... |
Currently unused. |
A logical vector with length equal to ncol(X)
.
data(mtcars)
Y <- mtcars$mpg
X <- mtcars[,-which(colnames(mtcars)=="mpg")]
screen.FSelector.correlation(Y, X, gaussian(), filter = "rank.correlation")
# based on examples in SuperLearner package
set.seed(1)
n <- 100
p <- 20
X <- matrix(rnorm(n*p), nrow = n, ncol = p)
X <- data.frame(X)
Y <- X[, 1] + sqrt(abs(X[, 2] * X[, 3])) + X[, 2] - X[, 3] + rnorm(n)
library(SuperLearner)
sl = SuperLearner(Y, X, family = gaussian(), cvControl = list(V = 2),
SL.library = list(c("SL.glm", "All"),
c("SL.glm", "screen.FSelector.correlation")))
sl
sl$whichScreen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.