Skip to contents

This is the generic function for doing the necessary preprocessing for running independent component analysis.

Usage

ica_processing(object, fast_svd = TRUE, random_seed = 123L, .verbose = TRUE)

Arguments

object

The class, see BulkCoExp(). Ideally, you should run preprocess_bulk_coexp() before applying this function.

fast_svd

Boolean. Shall randomised SVD be used for the whitening. This is faster and usually causes little precision loss.

random_seed

Integer. Seed for the randomised SVD. Only relevant, if fast_svd = TRUE.

.verbose

Boolean. Controls verbosity of the function.

Value

BulkCoExp with the needed data for ICA in the properties of the class.

Examples

# whitening ahead of the ICA runs
mat <- t(synthetic_signal_matrix()$mat)
obj <- BulkCoExp(mat, data.table::data.table(sample_id = rownames(mat)))
obj <- preprocess_bulk_coexp(obj, hvg = 0.3, .verbose = FALSE)
obj <- ica_processing(obj, .verbose = FALSE)
dim(obj@processed_data$K)
#> [1]  89 300