R/dimred_ica.R

Defines functions dimred_ica

Documented in dimred_ica

#' @rdname dimred
#' @export
dimred_ica <- function(x, ndim = 3) {
  requireNamespace("fastICA")

  if (is_sparse(x)) {
    x <- as.matrix(x)
  }

  space <- fastICA::fastICA(t(scale(t(x))), n.comp = ndim)$S

  .process_dimred(space)
}

Try the dyndimred package in your browser

Any scripts or data that you put into this service are public.

dyndimred documentation built on March 23, 2021, 9:06 a.m.