Variable Selection with Knockoffs

Documentation Build Status Code Coverage
build Actions Status CI (Julia nightly) codecov

This is a Julia implementation of the knockoff filter, taking many inspirations from the MATLAB/R implementation of knockoff-filter, python implementation of knockpy, and also the C++/R code of knockoffgwas. The knockoff filter is a general framework for controlling the false discovery rate when performing variable selection. As the name suggests, the knockoff filter operates by manufacturing knockoff variables that are cheap — their construction does not require collecting any new data — and are designed to mimic the correlation structure found within the original variables. The knockoffs serve as negative controls and they allow one to identify the truly important predictors, while controlling the false discovery rate (FDR) — the expected fraction of false discoveries among all discoveries.

For more information, please see the main webpage

Installation

Download and install Julia. Within Julia, copy and paste the following:

using Pkg
pkg"add https://github.com/biona001/Knockoffs.jl"

This package supports Julia v1.6+.

Calling Knockoffs.jl from R and Python

See documentation for usage from R. If many users request of it, I will write a similar tutorial for calling Knockoffs.jl from your favorite language.

Package Features

  • Fast coordinate algorithms for MVR, ME, and SDP knockoffs
  • Fast coordinate descent algorithms for grouped MVR/ME/SDP knockoffs, and a representative group knockoff approach which empirically has superior power.
  • Built-in functions to define groups
  • Built-in functions to compute feature importance scores via Lasso/marginal regressions
  • Preliminary support for many other kinds of knockoffs, see documentation.