Reconstructs signals after removing specified ICA components (e.g., artifacts).
Usage
removeICAComponents(
pe,
ica_result,
remove_components,
assay_name = NULL,
output_assay = "ica_cleaned"
)References
Hyvarinen A, Oja E (2000). "Independent component analysis: algorithms and applications." Neural Networks, 13(4-5), 411-430.
See also
runICA() for performing the ICA decomposition,
icaRemove() for the alternative component removal implementation,
detectBadChannels() for channel-level artifact detection.
Examples
pe <- PhysioExperiment(
assays = list(raw = matrix(rnorm(1000), nrow = 100, ncol = 10)),
colData = S4Vectors::DataFrame(label = paste0("Ch", 1:10)),
samplingRate = 256
)
# \donttest{
if (requireNamespace("fastICA", quietly = TRUE)) {
ica_result <- runICA(pe, n_components = 5)
pe_clean <- removeICAComponents(pe, ica_result, remove_components = c(1, 3))
}
# }