R/obj_function.R

Defines functions obj_func

obj_func<-function(X,Y,beta_score,X_ncol=X_ncol,maskv=maskv,lambda=0){
  Xm=matrix(X,ncol=X_ncol)
  #browser()
  sum( (Xm %*% beta_score - Y)^2) * 0.5 + lambda * sum(Xm)
}
TRUE
weililab/scMAGeCK documentation built on April 21, 2024, 10:36 a.m.