R/crit_cataXj_fast.R

Defines functions .crit_cataXj_fast

.crit_cataXj_fast=function(Xj, index, Stot){
  #Xj list

  n=nrow(Xj[[1]])
  nblo=length(Xj)
  nvar=ncol(Xj[[1]])

  S=Stot[index, index]



  if (length(index)>1)
  {
    ressvd=svd(S)
    lambda=ressvd$d[1]
  }else{
    lambda=1
  }

  Q=nblo-lambda

  return(Q)

}

Try the ClustBlock package in your browser

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

ClustBlock documentation built on Aug. 30, 2023, 5:08 p.m.