R/Average.Contraction.R

"Average.Contraction" <-
function(m, m.rid) {
  d <- stats::dist(m); # it computes the euclidean distance between all pairs of rows of m
  d.rid <- stats::dist(m.rid);
  s <- length(d);
  average.contraction <- (1/s) * sum(d/d.rid);
  average.contraction  
}

Try the clusterv package in your browser

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

clusterv documentation built on June 8, 2025, 10:21 a.m.