R/CDMEAN0.R

Defines functions CDMEAN0

Documented in CDMEAN0

CDMEAN0 <-
  function(Train,Test, P, lambda=1e-5, C=NULL){
    PTrain<-P[rownames(P)%in%Train,]
    if (!is.null(C)){ PTrain<-C%*%PTrain}
    CDmean<-mean(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.