Skip to contents

[Experimental] GPU counterpart of bixverse::rs_nmf_consensus_mc(). Assumes that the sparse data is pre-filtered for the cells/genes you wish to include. Indices in the sparse data need to be 0-indexed.

Usage

rs_nmf_consensus_mc_gpu(
  sparse_data,
  k,
  preprocessing,
  use_second_layer,
  nmf_hals_params,
  nmf_consensus_params,
  n_runs,
  seed,
  verbose
)

Arguments

sparse_data

A named list with data, indptr, indices, nrow, ncol and cs_type.

k

Integer. Number of latent factors. Must be at least 2 and at most 128, the GPU solver's rank cap.

preprocessing

String. One of c("none", "sd", "sqrt_sd").

use_second_layer

Boolean. If TRUE, runs NMF on normalised counts.

nmf_hals_params

Named list. Contains the NMF parameters. The nmf_init field is ignored, restarts always use random initialisation.

nmf_consensus_params

Named list. Contains the consensus parameters.

n_runs

Integer. Number of restarts. Must be at least 2.

seed

Integer. Base random seed. Restart i uses seed + i.

verbose

Integer. 0L - quiet; 1L - normal verbosity; 2L - detailed verbosity.

Value

A list with w, h, rel_error, rel_run_errors, labels, local_density, kept, silhouette, stability, cluster_sizes, n_dropped and n_empty_clusters. The errors are relative to the squared Frobenius norm of the input.

References

Kotliar et al., eLife, 2019