R/row_standardize.R

Defines functions row_standardize

Documented in row_standardize

#' Row standardize a matrix
#'
#'
#' @param W matrix
#' @return row-standardized matrix
#' @export
row_standardize = function(W){
  return(diag(1/rowSums(W)) %*% W)
}

Try the fabPrediction package in your browser

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

fabPrediction documentation built on May 29, 2024, 7:05 a.m.