FXSampler

class knockpy.knockoffs.FXSampler(X, groups=None, sample_tol=1e-05, S=None, method=None, verbose=False, **kwargs)[source]

Bases: knockpy.knockoffs.KnockoffSampler

Samples FX knockoffs. See the GaussianSampler documentation for description of the arguments.

Methods

check_PSD_condition(Sigma, S)

Checks that the feature-knockoff cov matrix is PSD.

check_xk_validity(X, Xk[, testname, alpha])

Runs a variety of KS tests on X and Xk to (informally) check that Xk are valid knockoffs for X.

fetch_S()

Rescales S to the same scale as the initial X input

many_ks_tests(sample1s, sample2s)

Samples1s, Sample2s = list of arrays Gets p values by running ks tests and then does a multiple testing correction.

sample_knockoffs([check_psd])

Samples knockoffs.

Methods Summary

fetch_S()

Rescales S to the same scale as the initial X input

sample_knockoffs([check_psd])

Samples knockoffs.

Methods Documentation

fetch_S()[source]

Rescales S to the same scale as the initial X input

sample_knockoffs(check_psd=False)[source]

Samples knockoffs. returns n x p knockoff matrix.

Parameters
check_psdbool

If True, will check and enforce that S is a valid S-matrix. Defalts to False.