foci

Function foci, implements the Feature Ordering by Conditional Independence algorithm introduced in the paper A Simple Measure Of Conditional Dependence. It produces an ordering of the predictors according to their predictive power. This ordering is used for variable selection without putting any assumption on the distribution of the data or assuming any particular underlying model. The simplicity of the estimation of the conditional dependence coefficient makes it an efficient method for variable ordering that can be used for high dimensional settings.

library(FOCI)

Example 1

In the following example, \(Y\) is a function of the first four columns of \(X\) in a complex way.

n = 1000
p = 150
X = matrix(rnorm(n * p), ncol = p)
Y = X[, 1] * X[, 2] + sin(X[, 1] * X[, 3]) + X[, 4]^2
result = foci(Y, X)
result
#> [1]  4 61