diff --git a/R/machine_learning.R b/R/machine_learning.R index 92159d60a06e097a963344441d59ed55065ffb35..f57df72e3637f1b72db97ea0777f37f2272f4d1f 100644 --- a/R/machine_learning.R +++ b/R/machine_learning.R @@ -5,7 +5,7 @@ #' @param df_features <`data.frame`> contains the dataset ready to go through the models #' @param df_outcome <`data.frame`> contains the outcome variables: a single outcome variable in case of classification, and two outcome variables in case of survival analysis. Namely, in case of `main_task == "classification"`, `df_outcome` should contain columns `outcome_col` and `id_col`. In case of `main_task == "survival"`, `df_outcome` should contain columns `outcome_col`, "event_col" and `id_col`. #' @param job <`character`> can either be "train" or "predict" -#' @param ml_model <`character`> model that should be used. Can either be "cox", "logistic", "random_forest", "random_survival_forest", "xgb_cox" or "xgb_aft" +#' @param ml_model <`character`> model that should be used. Can either be "cox", "xgboost", "logistic", "random_forest", "random_survival_forest", "xgb_cox" or "xgb_aft" #' @param ml_options <`list`> specifying some needed arguments and options for machine learning. The list should contain the following elements: #' - t_max_survival: <`int`> maximum time of survival prediction, in case of `main_task == "survival"` #' @param feature_engineer <`character`> feature engineering method to be applied during transform. Either "umap", "pca" or "none" @@ -92,7 +92,7 @@ machine_learning <- function(df_features, cat("Transforming the dataset...\n") } if (job == "train") { - if (dummy_binary){ + if (dummy_binary) { transformer_results = transform_for_modeling_dichotomy( df = df_features, action = "train", @@ -117,7 +117,7 @@ machine_learning <- function(df_features, ) } if (job == "predict") { - if (dummy_binary){ + if (dummy_binary) { df_features = purrr::pluck( transform_for_modeling_dichotomy( df = df_features, diff --git a/man/machine_learning.Rd b/man/machine_learning.Rd index c32d62893829bc9f8451cdb86c3a2ee24d098bb8..e428509e82d97da5e9d4603e91b82b0862800215 100644 --- a/man/machine_learning.Rd +++ b/man/machine_learning.Rd @@ -29,7 +29,7 @@ machine_learning( \item{job}{<\code{character}> can either be "train" or "predict"} -\item{ml_model}{<\code{character}> model that should be used. Can either be "cox", "logistic", "random_forest", "random_survival_forest", "xgb_cox" or "xgb_aft"} +\item{ml_model}{<\code{character}> model that should be used. Can either be "cox", "xgboost", "logistic", "random_forest", "random_survival_forest", "xgb_cox" or "xgb_aft"} \item{outcome_col}{<\code{character}> name of the time column in case of \code{main_task == "survival"} or name of the single outcome column in case of \code{main_task == "classification"}}