R/PEVMEAN0.R

Defines functions PEVMEAN0

Documented in PEVMEAN0

PEVMEAN0 <-
  function(Train,Test, P, lambda=1e-5, C=NULL){
    PTrain<-P[rownames(P)%in%Train,]
    if (is.null(C)){ 
    PEVmean<-mean(diag(PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)),t(PTrain))))
    }else {PEVmean<-mean(diag(C%*%PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)),t(C%*%PTrain))))
    }
    return(PEVmean)
  }

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.