screen.FSelector.consistency: Consistency screening algorithm

View source: R/fselector.R

screen.FSelector.consistencyR Documentation

Consistency screening algorithm

Description

The consistency algorithm utilizes best.first.search to find the optimal combination of columns of X to minimize 'inconsistency' with the outcome Y. 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). Search algorithms do not rank features and therefore this algorithm does not allow for specification of either the number of features to be chosen (k) or the method by which they should be chosen (selector).

Usage

screen.FSelector.consistency(Y, X, family, verbose = FALSE, ...)

Arguments

Y

Outcome (numeric vector). See SuperLearner for specifics.

X

Predictor variable(s) (data.frame or matrix). See SuperLearner for specifics.

family

Error distribution to be used in the model: gaussian or binomial. Currently unused. See SuperLearner for specifics.

verbose

Should debugging messages be printed? Default: FALSE.

...

Currently unused.

Value

A logical vector with length equal to ncol(X).

References

http://hdl.handle.net/2014/35171

Examples

data(iris)
Y <- as.numeric(iris$Species=="setosa")
X <- iris[,-which(colnames(iris)=="Species")]
screen.FSelector.consistency(Y, X, binomial())

# 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.consistency")))
sl
sl$whichScreen

saraemoore/SLScreenExtra documentation built on Nov. 4, 2023, 9:31 p.m.