Welcome to knockpy’s documentation!
Knockoffs are a powerful tool which can be used in combination with nearly any machine learning algorithm to control the false discovery rate (FDR) in feature selection. Knockoffs were initially developed in Barber and Candes 2015 and Candes et al 2018.
Knockpy is a python implementation of the knockoffs framework which makes it easy to apply knockoff-based inference in only a few lines of code. Knockpy is also built to be modular, so researchers and analysts can easily layer functionality on top of it. See usage for more details!
Contents:
- Getting Started
- Tutorials
- MRC Knockoffs Primer
- API Reference
- The KnockoffFilter
- Feature Statistics
DeepPinkStatistic
FeatureStatistic
LassoStatistic
MargCorrStatistic
OLSStatistic
RandomForestStatistic
RidgeStatistic
calc_lars_path()
calc_mse()
combine_Z_stats()
compute_residual_variance()
data_dependent_threshhold()
fit_lasso()
fit_ridge()
parse_logistic_flag()
parse_y_dist()
MLR_FX_Spikeslab
MLR_Spikeslab
MLR_Spikeslab_Splines
OracleMLR
- Gaussian and Fixed-X Knockoff Samplers
- Metropolized Samplers
- S-matrix computation
compute_smatrix()
compute_smatrix_factored()
divide_computation()
merge_groups()
parse_method()
cholupdate()
maxent_loss()
mmi_loss()
mvr_loss()
solve_ciknock()
solve_maxent()
solve_maxent_factored()
solve_mmi()
solve_mvr()
solve_mvr_factored()
calc_min_group_eigenvalue()
solve_SDP()
solve_equicorrelated()
solve_group_SDP()
- Kpytorch
- Gaussian graphical model discovery
- Quickly creating data-generating processes
AR1()
DGP
DirichletCorr()
ErdosRenyi()
FactorModel()
NestedAR1()
PartialCorr()
UniformDot()
Wishart()
block_equi_graph()
construct_gibbs_grid()
coords2num()
cov2blocks()
create_correlation_tree()
create_grouping()
create_sparse_coefficients()
graph2cliques()
num2coords()
sample_ar1t()
sample_block_tmvn()
sample_gibbs()
sample_response()
- Utility functions