View source: R/preprocessing_functions.R
sigmoidTransform | R Documentation |
Function to used to perform a k-means k=2 on a W matrix
sigmoidTransform(col.vector, q = 0.95)
col.vector |
vector taken from a matrix columns |
q |
quantile |
vector
## Not run: Wf <- HMatrix(nmf_exp, k = 5) ssf <- apply(Wf, 1, function(x){ x <- sigmoidTransform(x) k <- kmeans(x, 2) max_idx <- which.max(k$centers) paste(if_else(k$cluster == max_idx, "1", "0"), collapse = "") }) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.