R/PEVMAX0.R

Defines functions PEVMAX0

Documented in PEVMAX0

PEVMAX0 <-
  function(Train,Test, P, lambda=1e-5, C=NULL){
    PTrain<-P[rownames(P)%in%Train,]
    if (!is.null(C)){
    PEVmean<-max(diag(C%*%PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)),t(C%*%PTrain))))
    } else {PEVmean<-max(diag(PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)),t(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.