R/solvers.R
binarizeTop.Rd
Keeps only the top top values in each column of a matrix, setting others to 0.
top
binarizeTop(Z, top, keepVals = TRUE)
A numeric matrix.
Number of top entries to keep in each column.
If TRUE, retains original values above the cutoff; otherwise, sets them to 1.
TRUE
A modified matrix with only top entries retained per column.