
Wrapper function for consensus NMF parameters
params_nmf_consensus.RdControls the clustering step of consensus NMF: the components of
every restart are pooled, outliers are dropped by local density, and the
survivors are k-means clustered into k groups whose median becomes the
consensus factor.
Usage
params_nmf_consensus(
consensus_target = c("h", "w"),
n_neighbours = 0L,
density_threshold = 0.5,
kmeans_iters = 100L,
kmeans_n_init = 3L
)Arguments
- consensus_target
String.
"h"clusters the gene programmes (the spectra), which is what cNMF does and what you almost always want."w"clusters in sample space instead, which on single cell data means cell space: it pools a dense(k * n_runs) x n_cellsmatrix and runs an exhaustive cosine search over it, so it gets expensive fast. One ofc("h", "w"). Defaults to"h".- n_neighbours
Integer. Neighbours used for the local density estimate.
0Lpicksceiling(0.3 * n_runs)for you. Defaults to0L.- density_threshold
Numeric. Components whose mean cosine distance to their neighbours exceeds this are dropped as unstable. Cosine distance cannot exceed 2, so any value
>= 2disables the filter entirely. Defaults to0.5.- kmeans_iters
Integer. Maximum k-means iterations. Defaults to
100L.- kmeans_n_init
Integer. Number of k-means restarts. Defaults to
3L.
Value
A named list with the following elements:
consensus_target - String.
"h"clusters the gene programmes (the spectra), which is what cNMF does and what you almost always want."w"clusters in sample space instead, which on single cell data means cell space: it pools a dense(k * n_runs) x n_cellsmatrix and runs an exhaustive cosine search over it, so it gets expensive fast. One ofc("h", "w"). Defaults to"h".n_neighbours - Integer. Neighbours used for the local density estimate.
0Lpicksceiling(0.3 * n_runs)for you. Defaults to0L.density_threshold - Numeric. Components whose mean cosine distance to their neighbours exceeds this are dropped as unstable. Cosine distance cannot exceed 2, so any value
>= 2disables the filter entirely. Defaults to0.5.kmeans_iters - Integer. Maximum k-means iterations. Defaults to
100L.kmeans_n_init - Integer. Number of k-means restarts. Defaults to
3L.