R/CDMAX0.R

Defines functions CDMAX0

Documented in CDMAX0

CDMAX0 <-
  function(Train,Test, P, lambda=1e-5, C=NULL){
    PTrain<-P[rownames(P)%in%Train,]
    if (!is.null(C)){ PTrain<-C%*%PTrain}
    CDmean<-max(diag(PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)),t(PTrain)))/diag(tcrossprod(PTrain)))
    return(CDmean)
  }

Try the STPGA package in your browser

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

STPGA documentation built on May 2, 2019, 8:19 a.m.