Learn R Programming

Libra (version 1.7)

potts: Linearized Bregman solver for composite conditionally likelihood of Potts model with lasso penalty and block-group penalty.

Description

Solver for the entire solution path of coefficients.

Usage

potts(
  X,
  kappa,
  alpha,
  c = 1,
  tlist,
  nt = 100,
  trate = 100,
  group = FALSE,
  intercept = TRUE,
  print = FALSE
)

Arguments

X

An n-by-p matrix of variables.

kappa

The damping factor of the Linearized Bregman Algorithm that is defined in the reference paper. See details.

alpha

Parameter in Linearized Bregman algorithm which controls the step-length of the discretized solver for the Bregman Inverse Scale Space. See details.

c

Normalized step-length. If alpha is missing, alpha is automatically generated by alpha=c*n/(kappa*||XX^T*XX||_2), where XX is 0-1 indicator matrix induced by the class of each Xi. Default is 1. It should be in (0,2). If beyond this range the path may be oscillated at large t values.

tlist

Parameters t along the path.

nt

Number of t. Used only if tlist is missing. Default is 100.

trate

tmax/tmin. Used only if tlist is missing. Default is 100.

group

Whether to use a block-wise group penalty, Default is FALSE

intercept

if TRUE, an intercept is included in the model (and not penalized), otherwise no intercept is included. Default is TRUE.

print

If TRUE, the percentage of finished computation is printed.

Value

A "potts" class object is returned. The list contains the call, the path, the intercept term a0 and value for alpha, kappa, t.

Details

The data matrix X is transformed into a 0-1 indicator matrix D with each column \(D_{jk}\) means \(1(X_j)==k\). The Potts model here used is described as following: $$P(x) \sim \exp(\sum_{jk} a_{0,jk}1(x_i=1) + d^T \Theta d/2)$$ where \(\Theta\) is p-by-p symmetric and 0 on diagnal. Then conditional on \(x_{-j}\) $$P(x_j=k) \sim exp(\sum_{k} a_{0,jk} + \sum_{i\neq j,r}\theta_{jk,ir}d_{ir})$$ then the composite conditional likelihood is like this: $$- \sum_{j} condloglik(X_j | X_{-j})$$

Examples

Run this code
# NOT RUN {
X = matrix(floor(runif(200*10)*3),200,10)
obj = potts(X,10,nt=100,trate=10,group=TRUE)

# }

Run the code above in your browser using DataLab