R/coefnorm.R

Defines functions coefnorm

Documented in coefnorm

coefnorm=function(coeflist,q=1){
  ###coeflist comes from mrelnet or multnet
  nmat=coeflist[[1]]*0
  nclass=length(coeflist)
  for(i in seq(nclass)){
    nmat=nmat+abs(coeflist[[i]])^q
  }
  nmat^(1/q)
}

Try the glmnet package in your browser

Any scripts or data that you put into this service are public.

glmnet documentation built on Aug. 22, 2023, 9:12 a.m.