Skip to contents

Generate initial Markov chain state with Lasso.

Usage

lasso_deltas(
  X,
  y,
  lambda = NULL,
  verbose = FALSE,
  alpha = 1,
  rank_fn = order_plain,
  k = ncol(X)
)

Arguments

X

Design matrix of traning data; rows should be for the cases, and columns for different features.

y

Vector of class labels in training or test data set. Must be coded as non-negative integers, e.g., 1,2,...,C for C classes.

lambda

A user supplied lambda sequence for glmnet cross-validation. NULL by default, and it will be generated by glmnet.

alpha

The elasticnet mixing parameter for glmnet.

Value

A matrix - the initial state of Markov Chain for HTLR model fitting.

References

Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1-22.

See also