screen.FSelector.oneR | R Documentation |
AKA "1R" or "One Rule" (Holte, 1993). Features ranked and selected by the
accuracy of their predictions of the outcome Y
based on a single
rule (or single-level decision tree). Implemented for binomial()
family only and designed to be used with binary or categorical X
.
Continuous X
will be discretized by FSelector
and
Discretize
using the MDL method (Fayyad & Irani,
1993).
screen.FSelector.oneR(
Y,
X,
family,
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:
|
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)
.
https://doi.org/10.1023/A:1022631118932 http://hdl.handle.net/2014/35171
data(iris)
Y <- as.numeric(iris$Species=="setosa")
X <- iris[,-which(colnames(iris)=="Species")]
screen.FSelector.oneR(Y, X, binomial(), selector = "cutoff.k.percent", k = 0.5)
# 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])))
library(SuperLearner)
sl = SuperLearner(Y, X, family = binomial(), cvControl = list(V = 2),
SL.library = list(c("SL.lm", "All"),
c("SL.lm", "screen.FSelector.oneR")))
sl
sl$whichScreen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.