cost: cost function

View source: R/utils.R View source: R/cost.R View source: R/cmpt-cost.R

costR Documentation

cost function

Description

cost computes the cost function of Mglasso method.

Usage

cost(beta, x, lambda1 = 0, lambda2 = 0)

cost(beta, x, lambda1 = 0, lambda2 = 0)

cost(beta, x, lambda1 = 0, lambda2 = 0)

Arguments

beta

p by p numeric matrix. In rows, regression vectors coefficients after node-wise regression. diag(beta) = 0.

x

n by p numeric matrix. Data with variables in columns.

lambda1

numeric scalar. Lasso penalization parameter.

lambda2

numeric scalar. Fused-group Lasso penalization parameter.

Value

numeric scalar. The cost.


desanou/mglasso documentation built on July 1, 2023, 6:39 a.m.