diff --git a/R/impute_randomforest.R b/R/impute_randomforest.R index a860de50..8e8a24ca 100644 --- a/R/impute_randomforest.R +++ b/R/impute_randomforest.R @@ -1,9 +1,7 @@ #' Imputation of Missing Values Using Random Forest Imputation #' #' \code{impute_randomforest} performs imputation for missing values in the data using the random -#' forest-based method implemented in the \code{missForest} package. This method is particularly -#' useful for handling data with a mixture of categorical and continuous variables, as well as -#' handling non-linear relationships between variables. +#' forest-based method implemented in the \code{missForest} package. #' #' The function imputes missing values by building random forests, where missing values are #' predicted based on other available values within the dataset. For each variable with missing @@ -17,6 +15,19 @@ #' such as controlling the number of trees used in the random forest models or specifying the #' stopping criteria. For a full list of parameters, refer to the \code{missForest} documentation. #' +#' To enable parallelization, ensure that the `doParallel` package is installed and loaded: +#' ``` +#' install.packages("doParallel") +#' library(doParallel) +#' ``` +#' Then register the desired number of cores for parallel processing: +#' ``` +#' registerDoParallel(cores = 6) +#' ``` +#' To leverage parallelization during the imputation, pass `parallelize = "variables"` +#' as an argument to the `missForest` function. +#` +#' #' Stekhoven, D.J., & Bühlmann, P. (2012). MissForest—non-parametric missing value imputation #' for mixed-type data. Bioinformatics, 28(1), 112-118. https://doi.org/10.1093/bioinformatics/btr597 #' diff --git a/man/assign_peptide_type.Rd b/man/assign_peptide_type.Rd index 2367778b..5f0da6ee 100644 --- a/man/assign_peptide_type.Rd +++ b/man/assign_peptide_type.Rd @@ -43,6 +43,5 @@ data <- data.frame( aa_after = c("T", "R", "T") ) - assign_peptide_type(data, aa_before, last_aa, aa_after) } diff --git a/man/impute.Rd b/man/impute.Rd index 93b562bd..d783952f 100644 --- a/man/impute.Rd +++ b/man/impute.Rd @@ -13,7 +13,7 @@ impute( comparison = comparison, missingness = missingness, noise = NULL, - method = c("ludovic", "randomforest"), + method = c("ludovic"), skip_log2_transform_error = FALSE, retain_columns = NULL, ... diff --git a/man/impute_randomforest.Rd b/man/impute_randomforest.Rd index 1cb475cf..59e22895 100644 --- a/man/impute_randomforest.Rd +++ b/man/impute_randomforest.Rd @@ -41,9 +41,7 @@ and an \code{imputed} column indicating whether each value was imputed (\code{TR } \description{ \code{impute_randomforest} performs imputation for missing values in the data using the random -forest-based method implemented in the \code{missForest} package. This method is particularly -useful for handling data with a mixture of categorical and continuous variables, as well as -handling non-linear relationships between variables. +forest-based method implemented in the \code{missForest} package. } \details{ The function imputes missing values by building random forests, where missing values are @@ -58,6 +56,20 @@ This function allows passing additional parameters to the underlying \code{missF such as controlling the number of trees used in the random forest models or specifying the stopping criteria. For a full list of parameters, refer to the \code{missForest} documentation. +To enable parallelization, ensure that the \code{doParallel} package is installed and loaded: + +\if{html}{\out{