This 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
)

Arguments

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).

Value

A list of two objects. out: the fitted model from train.fun; S: a list of selected variables.

References

Zhang L, Janson L (2020). “Floodgate: Inference for Model-Free Variable Importance.” arXiv preprint arXiv:2007.01283.

See also

Other methods: calculate.V_mean(), calulate.mu_Xk(), fg.inference.binary(), fg.inference(), floodgate.binary(), floodgate(), inference_general()