fit.mu: Fit a model on the training data for a given alogorithm

Description Usage Arguments Value References See Also

View source: R/method.R

Description

This function fits a model on the training data for a given alogorithm.

Usage

1
2
3
4
5
6
7
8
9
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

\insertRef

LZ-LJ:2020floodgate

See Also

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


LuZhangH/floodgate documentation built on Aug. 30, 2020, 2:10 a.m.