fit.mu.RdThis function fits a model on the training data for a given alogorithm.
fit.mu( X, Y, binary = FALSE, algo = "lasso", train.fun, active.fun, verbose = TRUE )
| X | a n by p matrix, containing all the covariates. |
|---|---|
| Y | a n by 1 matrix, containing the response variables. |
| binary | whether the response variable is binary (will be converted to factors if TRUE; default: FALSE). |
| algo | a fitting algorithm. |
| train.fun | a function to perform model fitting on the training data. |
| active.fun | a function which takes the output of train.fun and outputs the selected variables. |
| verbose | whether to show intermediate progress (default: FALSE). |
A list of two objects. out: the fitted model from train.fun; S: a list of selected variables.
Zhang L, Janson L (2020). “Floodgate: Inference for Model-Free Variable Importance.” arXiv preprint arXiv:2007.01283.
Other methods:
calculate.V_mean(),
calulate.mu_Xk(),
fg.inference.binary(),
fg.inference(),
floodgate.binary(),
floodgate(),
inference_general()