View source: R/make_xgb_models.R
fit_depmap_models | R Documentation |
This function creates an XGBoost model for each perturbation given, and returns a list of model objects.
fit_depmap_models(
depmap_data,
models_to_make,
response_cutoff = 0.5,
weight_cap = 0,
nfolds = 3,
nrepeats = 1,
nrounds = 200,
min_score = 0.5,
max_depth = 3,
f_subsample = 1,
skip_eval = FALSE,
shuffle = FALSE,
n_threads = 4,
xgb_params = NULL,
use_gpu = TRUE,
gpu_id = 0
)
response_cutoff |
The value above which the sample is considered sensitive. |
weight_cap |
The maximum weight of each minority case when resampling. Set to 0 if no resampling needed. |
nfolds |
The number of folds in k-fold cross validation. |
nrepeats |
The number of repeats in k-fold cross validation. |
nrounds |
The maximum number of trees in the XGBoost model. |
min_score |
The minimum number of r^2 value for a model to be considered for the next stage (making predictions and calculating SHAP values). |
skip_eval |
Default = FALSE. If TRUE, k-fold CV will not be conducted and instead all models will be pushed to the next stage. |
use_gpu |
Default = TRUE. Set to FALSE if using CPU. |
perturbation |
Column name of the perturbation (e.g. "ko_ctnnb1"). |
indx |
Integer index used, for progress report. |
total |
Integer of the total number of perturbations passed to this function, for progress report. |
dataset |
A dataframe with the perturbation in a column and all other predictors. Sample names are row names. |
fit_depmap_models(my_data, c("ko_ctnnb1","ko_myod1"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.