screen.wgtd.ttestP | R Documentation |
Convenience wrapper to perform feature selection according to the ranking of
P-values returned from weighted t-tests. Implemented via
wtd.t.test
.
screen.wgtd.ttestP(..., selector = "cutoff.k", k = 1, minP = 0.1)
... |
Passed to |
selector |
A string corresponding to a subset selecting function
implemented in the FSelector package. One of:
|
k |
Numeric. Minimum number or proportion of features to select.
Passed through to the |
minP |
Numeric. To pass the screen, resulting P-values must not exceed
this number. Default is |
A logical vector with length equal to ncol(X)
# based on example in SuperLearner package
set.seed(1)
n <- 100
p <- 20
X <- matrix(rnorm(n*p), nrow = n, ncol = p)
X <- data.frame(X)
Y <- rbinom(n, 1, plogis(.2*X[, 1] + .1*X[, 2] - .2*X[, 3] + .1*X[, 3]*X[, 4] - .2*abs(X[, 4])))
obsWeights <- 1/runif(n)
screen.wgtd.ttestP(Y, X, binomial(), obsWeights, seq(n), minP = 0.05)
screen.wgtd.ttestP05 <- function(..., minP = 0.05){
screen.wgtd.ttestP(..., minP = minP)
}
library(SuperLearner)
sl = SuperLearner(Y, X, family = binomial(), cvControl = list(V = 2),
obsWeights = obsWeights,
SL.library = list(c("SL.lm", "All"),
c("SL.lm", "screen.wgtd.ttestP05")))
sl
sl$whichScreen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.