R/DOPT.R

Defines functions DOPT

Documented in DOPT

DOPT <-
  function(Train,Test=NULL, P, lambda=1e-5, C=NULL){
    PTrain<-P[rownames(P)%in%Train,]
    if (!is.null(C)){
    D<-determinant(C%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)), t(C)), logarithm=TRUE)$modulus
        } else {
    D<--determinant(crossprod(PTrain)+lambda*diag(ncol(PTrain)), logarithm=TRUE)$modulus
      
    }
    return(D)
  }

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.