From 3194afe39362c806dde841cccb43cc5c357ffd6a Mon Sep 17 00:00:00 2001 From: Sydeaka Watson Date: Tue, 21 Feb 2023 11:43:49 -0600 Subject: [PATCH] Initial commit of ML classification workflow --- .Rprofile | 1 + .gitignore | 6 + R/load_libraries.R | 22 + R/ml_helper_functions.R | 338 +++++ R/train_ml_model.R | 212 ++++ demo.qmd | 120 ++ renv.lock | 1864 ++++++++++++++++++++++++++++ renv_setup/renv_install_packages.R | 60 + tidymodels-ML-workflow.Rproj | 13 + 9 files changed, 2636 insertions(+) create mode 100644 .Rprofile create mode 100644 .gitignore create mode 100644 R/load_libraries.R create mode 100644 R/ml_helper_functions.R create mode 100644 R/train_ml_model.R create mode 100644 demo.qmd create mode 100644 renv.lock create mode 100644 renv_setup/renv_install_packages.R create mode 100644 tidymodels-ML-workflow.Rproj diff --git a/.Rprofile b/.Rprofile new file mode 100644 index 0000000..81b960f --- /dev/null +++ b/.Rprofile @@ -0,0 +1 @@ +source("renv/activate.R") diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8bf7555 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata +model_results/* +renv/* diff --git a/R/load_libraries.R b/R/load_libraries.R new file mode 100644 index 0000000..cc29e2e --- /dev/null +++ b/R/load_libraries.R @@ -0,0 +1,22 @@ +# Load the packages +suppressPackageStartupMessages(library(dplyr)) +suppressPackageStartupMessages(library(ggplot2)) +suppressPackageStartupMessages(library(testthat)) +suppressPackageStartupMessages(library(tidymodels)) +suppressPackageStartupMessages(library(yardstick)) +suppressPackageStartupMessages(library(DT)) +suppressPackageStartupMessages(library(pROC)) +suppressPackageStartupMessages(library(DALEXtra)) + +suppressPackageStartupMessages(library(here)) +suppressPackageStartupMessages(library(roxygen2)) +suppressPackageStartupMessages(library(openxlsx)) +suppressPackageStartupMessages(library(gridExtra)) +suppressPackageStartupMessages(library(tidymodels)) +suppressPackageStartupMessages(library(vip)) +suppressPackageStartupMessages(library(ranger)) +suppressPackageStartupMessages(library(lightgbm)) +suppressPackageStartupMessages(library(bonsai)) +suppressPackageStartupMessages(library(xgboost)) +suppressPackageStartupMessages(library(DataExplorer)) +suppressPackageStartupMessages(library(DALEXtra)) diff --git a/R/ml_helper_functions.R b/R/ml_helper_functions.R new file mode 100644 index 0000000..908263e --- /dev/null +++ b/R/ml_helper_functions.R @@ -0,0 +1,338 @@ + +############################################################################################### +### These tidymodels machine learning utilities were created by +### Sydeaka P. Watson, PhD of Korelasi Data Insights, LLC +### These functions are open source and are available in the following GitHub repository: +### https://github.com/korelasidata/tidymodels-ML-workflow +############################################################################################### + + + + +zero_variance <- function(vals) { + vals %>% + .[is.na(vals)] %>% + length(unique(.)) == 1 +} + +remove_zero_variance_fields <- function(dat) { + zv_fields <- sapply(dat, zero_variance) %>% .[. == TRUE] %>% names + + if (length(zv_fields) == 0) { + log_info("All fields had some variability. Returning dataframe with no changes.") + return(dat) + } else { + log_info("The following fields were identified as having zero variance: {paste(zv_fields, collapse=', ')}") + fields_to_keep <- colnames(dat)[!(colnames(dat) %in% zv_fields)] + dat <- dat %>% select_at(fields_to_keep) + log_info("Fields successfully removed") + } + + return(dat) +} + + +model_specifications <- list( + "xgboost" = boost_tree(engine = 'xgboost', trees = tune(), + tree_depth = tune(), min_n = tune(), learn_rate = tune(), + mtry = tune()), + + "gbm" = boost_tree(engine = 'lightgbm', trees = tune(), + tree_depth = tune(), min_n = tune(), learn_rate = tune(), + mtry = tune()), + + "random_forest" = rand_forest(trees = tune(), min_n = tune(), mtry = tune()) %>% + set_engine("ranger", importance = "impurity") + # set_engine("randomForest", importance = TRUE) +) + + + +get_model_config <- function(model_formula, model_specifications, selected_algorithm, model_mode) { + + model_spec <- model_specifications[[selected_algorithm]] %>% + set_mode(model_mode) + + model_wflow <- workflow(model_formula, model_spec) + + if (selected_algorithm == "xgboost") { + model_param_grid <- model_wflow %>% + extract_parameter_set_dials() %>% + update( + trees = trees(c(100, 1500)), + learn_rate = learn_rate(c(.00005, .5), trans= NULL), + tree_depth = tree_depth(c(6, 20)), + min_n = min_n(c(10, 60)), + mtry = mtry(c(5, 40)) + ) + } + + if (selected_algorithm == "gbm") { + model_param_grid <- model_wflow %>% + extract_parameter_set_dials() %>% + update( + trees = trees(c(100, 1500)), + learn_rate = learn_rate(c(.00005, .5), trans= NULL), + tree_depth = tree_depth(c(6, 20)), + min_n = min_n(c(10, 60)), + mtry = mtry(c(5, 40)) + ) + } + + + if (selected_algorithm == "random_forest") { + model_param_grid <- model_wflow %>% + extract_parameter_set_dials() %>% + update( + trees = trees(c(100, 1500)), + min_n = min_n(c(10, 60)), + mtry = mtry(c(5, 40)) + ) + } + + + rtn <- list( + model_spec = model_spec, + model_wflow = model_wflow, + model_param_grid = model_param_grid + ) + + return(rtn) + +} + +get_varimp <- function(selected_algorithm, final_model_fit, engine_specific_model_fit=NULL) { + if (selected_algorithm %in% c("xgboost")) { + df_varimp <- final_model_fit %>% + extract_fit_parsnip() %>% + vip::vi(object=.) %>% + mutate(PctImportance = round(Importance / sum(Importance) * 100, 2)) + + plot_varimp <- final_model_fit %>% + extract_fit_parsnip() %>% + vip::vip(geom = "col") + + theme_bw() + } + + + if (selected_algorithm %in% c("random_forest")) { + # ranger varimp + df_varimp <- final_model_fit %>% + extract_fit_parsnip() %>% + vip::vi(object=.) %>% + mutate(PctImportance = round(Importance / sum(Importance) * 100, 2)) + + plot_varimp <- final_model_fit %>% + extract_fit_parsnip() %>% + vip::vip(geom = "col") + + theme_bw() + + + # randomForest varimp + # type = either 1 or 2, specifying the type of importance measure + # (1 = mean decrease in accuracy, 2 = mean decrease in node impurity). + # df_varimp <- engine_specific_model_fit %>% + # importance(type=2) %>% + # data.frame(Variable = rownames(.), .) %>% + # set_colnames(c("Variable", "Importance")) %>% + # mutate(PctImportance = round(Importance / sum(Importance) * 100, 2)) %>% + # arrange(desc(PctImportance)) + # + # plot_varimp <- df_varimp %>% + # head(10) %>% + # ggplot(aes(x = reorder(Variable, PctImportance), y = PctImportance)) + + # geom_bar(stat = "identity", col = "black", show.legend = F) + + # coord_flip() + + # scale_fill_grey() + + # theme_bw() + + # ggtitle("Top 10 attributes") + + # xlab("") + ylab("% importance") + } + + + + if (selected_algorithm %in% c("gbm")) { + tree_imp <- engine_specific_model_fit %>% + lgb.importance(percentage = TRUE) + + df_varimp <- final_model_fit %>% + rename(Variable = Feature, Importance = Gain) %>% + select(Variable, Importance) %>% + mutate(PctImportance = round(Importance / sum(Importance) * 100, 2)) %>% + arrange(desc(PctImportance)) + + plot_varimp <- df_varimp %>% + head(10) %>% + ggplot(aes()) + } + + + + + if (selected_algorithm == "gbm") { + # Applying varimp utils specific to lightgbm + tree_imp <- engine_specific_model_fit %>% + lgb.importance(percentage = TRUE) + + df_varimp <- tree_imp %>% + rename(Variable = Feature, Importance = Gain) %>% + select(Variable, Importance) %>% + mutate(PctImportance = round(Importance / sum(Importance) * 100, 2)) %>% + arrange(desc(PctImportance)) + + plot_varimp <- df_varimp %>% + head(10) %>% + ggplot(aes(x = reorder(Variable, PctImportance), y = PctImportance)) + + geom_bar(stat = "identity", col = "black", show.legend = F) + + coord_flip() + + scale_fill_grey() + + theme_bw() + + ggtitle("Top 10 attributes") + + xlab("") + ylab("% importance") + } + + return(list( + df_varimp = df_varimp, + plot_varimp = plot_varimp + )) + +} + + +plot_confusion_matrix <- function() { + return(NULL) + + #cm <- pred_df %>% yardstick::conf_mat(Category, .pred_class) + + # Now compute the average confusion matrix across all folds in + # terms of the proportion of the data contained in each cell. + # First get the raw cell counts per fold using the `tidy` method + library(tidyr) + + cells_per_resample <- pred_df %>% + group_by(id) %>% + conf_mat(truth=Category, estimate=.pred_class) %>% + mutate(tidied = lapply(conf_mat, tidy)) %>% + unnest(tidied) + + # Get the totals per resample + counts_per_resample <- pred_df %>% + group_by(id) %>% + summarize(total = n()) %>% + left_join(cells_per_resample, by = "id") %>% + # Compute the proportions + mutate(prop = value/total) %>% + group_by(name) %>% + # Average + summarize(prop = mean(prop)) + + counts_per_resample + + # Now reshape these into a matrix + mean_cmat <- matrix(counts_per_resample$prop, byrow = TRUE, ncol = 4) + rownames(mean_cmat) <- levels(hpc_cv$obs) + colnames(mean_cmat) <- levels(hpc_cv$obs) + + round(mean_cmat, 3) + + # The confusion matrix can quickly be visualized using autoplot() + library(ggplot2) + + autoplot(cm, type = "mosaic") + autoplot(cm, type = "heatmap") + + + + cm <- caret::confusionMatrix(pred_df$.pred_class, pred_df$Category) + cm_d <- as.data.frame(cm$table) # extract the confusion matrix values as data.frame + cm_st <-data.frame(cm$overall) # confusion matrix statistics as data.frame + cm_st$cm.overall <- round(cm_st$cm.overall,2) # round the values + cm_d$diag <- cm_d$Prediction == cm_d$Reference # Get the Diagonal + cm_d$ndiag <- cm_d$Prediction != cm_d$Reference # Off Diagonal + cm_d[cm_d == 0] <- NA # Replace 0 with NA for white tiles + #cm_d$Reference <- reverse.levels(cm_d$Reference) # diagonal starts at top left + cm_d$ref_freq <- cm_d$Freq * ifelse(is.na(cm_d$diag),-1,1) + + + plt1 <- ggplot(data = cm_d, aes(x = Prediction , y = Reference, fill = Freq))+ + scale_x_discrete(position = "top") + + geom_tile( data = cm_d,aes(fill = ref_freq)) + + scale_fill_gradient2(guide = FALSE ,low="red3",high="orchid4", midpoint = 0,na.value = 'white') + + geom_text(aes(label = Freq), color = 'black', size = 3)+ + theme_bw() + + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), + legend.position = "none", + panel.border = element_blank(), + plot.background = element_blank(), + axis.line = element_blank(), + ) + + plt2 <- tableGrob(cm_st) + + # TO DO: Need to export this plot somehow. `grid.arrange` plots to console only. Value of `plot_predictions` is a tableGrob + plot_predictions <- grid.arrange(plt1, plt2, nrow = 1, ncol = 2, + top = grid::textGrob("Confusion Matrix", + gp = grid::gpar(fontsize=25,font=1))) +} + + + + + + + + + + + +plot_param <- function(metric_df, param, metric_name='rmse') { + metric_df %>% + filter(.metric == metric_name) %>% + arrange_at('mean') %>% + ggplot(aes_string(x=param, y='mean')) + + geom_point() + + xlab(param) + + ylab('') + + ggtitle(glue::glue("{metric_name} vs {param}")) +} + + + + + + + + + +# Helper function to get a single model fit on a bootstrap resample +fit_model_on_bootstrap <- function(split, best_wflow) { + best_wflow %>% + fit(data = analysis(split)) +} + + + +# Helper function to get prediction intervals +# boot_model <- boot_models$model[[1]] +# input_data <- dat_train_and_val[1:3,] +# predict(boot_model, new_data = input_data) +bootstrap_pred_intervals <- function(boot_models, input_data, lower_pct = .05, upper_pct = 0.95) { + # Get predictions on all input cases using all bootstrap models + pred_df <- boot_models %>% + mutate(preds = map(model, \(mod) predict(mod, new_data=input_data))) + + # Combine predictions across bootstraps into a matrix + pred_matrix <- bind_cols(pred_df$preds, .name_repair="minimal") %>% + as.matrix %>% t + + # Compute upper and lower confidence bounds + pred_intervals <- pred_matrix %>% apply(2, quantile, probs=c(lower_pct, upper_pct)) %>% t + + return(pred_intervals) +} + +# bootstrap_pred_intervals(boot_models, input_data, lower_pct = .05, upper_pct = 0.95) + + + + diff --git a/R/train_ml_model.R b/R/train_ml_model.R new file mode 100644 index 0000000..16773aa --- /dev/null +++ b/R/train_ml_model.R @@ -0,0 +1,212 @@ +if (FALSE) { + training_df = dat + selected_algorithm = "random_forest" + model_mode = "classification" + model_label="demo" + model_specifications = model_specifications + num_folds = 3 + grid_size = 10 + num_bootstraps = 4 + outcome_var = "Category" + features = colnames(dat) %>% .[. != "Category"] + do_parallel = FALSE + show_plots = TRUE + error_metric = "roc_auc" +} + +# training_df: Pre-processed dataset, ready for ML modeling +train_ml_model <- function(training_df, selected_algorithm = "gbm", model_mode = "classification", model_label="", + model_specifications = NULL, num_folds = 5, grid_size = 10, num_bootstraps = 20, + outcome_var = NULL, features = NULL, do_parallel = FALSE, show_plots = TRUE, + error_metric = "rmse" +) { + + log_info("Get relevant data subset") + dat_analysis <- training_df %>% + select_at(c(outcome_var, features)) + + log_info("Split the data into training/validation + testing sets") + # TO DO: For classification, stratified split on outcome variable levels + set.seed(94263) + dat_split <- initial_split(dat_analysis, prop = 0.85) + dat_train_and_val <- training(dat_split) + dat_test <- testing(dat_split) + + # Examine distribution of the outcome variable in training/validation and testing sets + # to do + + if (do_parallel) { + log_info("Set up parallel backend") + cores <- parallelly::availableCores(logical = FALSE) + cl <- parallel::makePSOCKcluster(cores) + doParallel::registerDoParallel(cl) + } + + + log_info("Generate k folds for CV") + # TO DO: For classification, stratified split on outcome variable levels + dat_folds <- vfold_cv(dat_train_and_val, v = num_folds) + + log_info("Config: Save the assessment set results") + ctrl <- control_grid(save_pred = TRUE, allow_par=TRUE, parallel_over = "everything", + verbose=TRUE) + + log_info("Model formula") + model_formula <- as.formula(paste(outcome_var, '~ .')) + + log_info("Get config for selected algorithm") + model_config <- get_model_config(model_formula, model_specifications, selected_algorithm, model_mode) + + log_info("Get model workflow") + model_spec <- model_config$model_spec + model_wflow <- model_config$model_wflow + model_param_grid <- model_config$model_param_grid + + + + log_info("Tune the hyperparameters using k-fold cross validation") + set.seed(3820983) + model_train_time <- system.time({ + model_res <- + model_wflow %>% + tune_grid(resamples = dat_folds, + grid = model_param_grid %>% grid_max_entropy(size = grid_size), + control = ctrl) + }) + + log_info("How long did it take to run?") + print(model_train_time) + + if (do_parallel) { + log_info("Shut down the parallel backend") + foreach::registerDoSEQ() + parallel::stopCluster(cl) + } + + log_info("Collect predictions") + predictions <- model_res %>% collect_predictions() + + log_info("Hyperparameter names") + param_names <- model_wflow %>% + extract_parameter_set_dials() %>% + select(name) %>% unlist %>% as.vector + + log_info("Compute labels associated with each parameter combination for the plots") + param_scenario_lbl <- paste(param_names, "={", param_names, "}", sep="") %>% + paste(., collapse="; ") + + log_info("Collect metrics across the CV folds") + tune_metrics <- model_res %>% + collect_metrics() %>% + mutate(scenario = glue::glue(param_scenario_lbl)) + + log_info("Visual summary: model performance across tuning scenarios") + plot_tune_metrics <- tune_metrics %>% + ggplot(aes(x=scenario)) + + geom_point(aes(x=scenario, y=mean)) + + geom_errorbar(aes(ymin=mean-std_err, ymax=mean+std_err), width=.2, + position=position_dodge(0.05)) + + facet_wrap(~.metric) + + coord_flip() + + log_info("Visual summary: model performance by individual param values") + #metric_name <- ifelse(model_mode == 'classification', 'roc_auc', 'rmse') + plot_perf_by_param <- lapply(param_names, function(nm) plot_param(tune_metrics, nm, error_metric)) + + log_info("Hyperparameter combo that has the lowest value of `error_metric`") + optimal_config <- select_best(model_res, metric = error_metric) + + log_info("Workflow associated with the optimal set of parameters") + best_wflow <- model_wflow %>% + finalize_workflow(optimal_config) + + log_info("The final model fit") + final_model_fit <- best_wflow %>% + fit(data = dat_train_and_val) + + log_info("Engine-specific model fit") + engine_specific_model_fit <- final_model_fit %>% + extract_fit_engine() + + ## Bootstrap model fits (for prediction intervals) + ## Reference: https://www.tidymodels.org/learn/statistics/bootstrap/ + + log_info("Get bootstrap resamples") + set.seed(27) + boot_samples <- bootstraps(dat_train_and_val, times = num_bootstraps, apparent = TRUE) + + log_info("Fit the best model on all bootstrap resamples") + boot_models <- + boot_samples %>% + mutate(model = map(splits, fit_model_on_bootstrap, best_wflow = best_wflow)) + + log_info("Variable importance") + varimp_res <- get_varimp(selected_algorithm, final_model_fit, engine_specific_model_fit) + df_varimp <- varimp_res$df_varimp + plot_varimp <- varimp_res$plot_varimp + + ## Explain model predictions + # will be implemented later + + log_info("Plot preds from top model") + if (model_mode == "classification") { + pred_df <- predictions %>% + filter(.config == optimal_config$.config) + + plot_predictions <- plot_confusion_matrix() + } + + if (model_mode == "regression") { + plot_predictions <- predictions %>% + filter(.config == optimal_config$.config) %>% + ggplot(aes_string(x = outcome_var, y = ".pred")) + + geom_point() + + geom_abline(slope=1, intercept=0, linetype=2) + + theme_bw() + + ggtitle(paste0(toupper(selected_algorithm), ' - ', model_label, "\nPredicted vs Actual in Out-of-Bag Sample")) + } + + log_info("List of objects to be returned by the function") + rtn <- list( + dat_split = dat_split, + dat_train_and_val = dat_train_and_val, + dat_test = dat_test, + dat_folds = dat_folds, + model_formula = model_formula, + model_spec = model_spec, + model_wflow = model_wflow, + model_param_grid = model_param_grid, + model_res = model_res, + param_names = param_names, + tune_metrics = tune_metrics, + plot_tune_metrics = plot_tune_metrics, + plot_perf_by_param = plot_perf_by_param, + optimal_config = optimal_config, + best_wflow = best_wflow, + final_model_fit = final_model_fit, + engine_specific_model_fit = engine_specific_model_fit, + boot_samples = boot_samples, + fit_model_on_bootstrap = fit_model_on_bootstrap, + boot_models = boot_models, + df_varimp = df_varimp, + plot_varimp = plot_varimp, + plot_predictions = plot_predictions + ) + + if (show_plots) { + log_info("Display summary plots") + plot_list_vars <- names(rtn)[grepl(pattern="plot_", names(rtn))] + plot_list <- rtn[plot_list_vars] + print(plot_list) + } + + log_info("Save results to disk") + filename <- file.path(run_results_folder, + glue::glue("model_res-{selected_algorithm}-{model_label}-{Sys.time()}.rds")) %>% + gsub(pattern=":| ", replacement=".", x=.) + + saveRDS(rtn, file=filename) + log_info("Model results saved to {filename}.") + + return(rtn) +} \ No newline at end of file diff --git a/demo.qmd b/demo.qmd new file mode 100644 index 0000000..f64cd9f --- /dev/null +++ b/demo.qmd @@ -0,0 +1,120 @@ +--- +title: "Untitled" +format: html +editor: visual +--- + +## Introduction + +## Setup + +```{r} +# Load the packages +suppressPackageStartupMessages(library(dplyr)) +suppressPackageStartupMessages(library(ggplot2)) +suppressPackageStartupMessages(library(testthat)) +suppressPackageStartupMessages(library(tidymodels)) +suppressPackageStartupMessages(library(yardstick)) +suppressPackageStartupMessages(library(DT)) +# suppressPackageStartupMessages(library(pROC)) +suppressPackageStartupMessages(library(recipes)) +suppressPackageStartupMessages(library(DALEXtra)) +suppressPackageStartupMessages(library(lightgbm)) +suppressPackageStartupMessages(library(bonsai)) +suppressPackageStartupMessages(library(ranger)) +suppressPackageStartupMessages(library(caret)) +suppressPackageStartupMessages(library(gridExtra)) +suppressPackageStartupMessages(library(logger)) + +``` + +```{r} +#source("R/load_libraries.R") +source("R/ml_helper_functions.R") +source("R/train_ml_model.R") +``` + +```{r} +# Helper functiont to create a folder +create_folder <- function(folder_path) { + if (dir.exists(folder_path)) { + log_info("Folder `{folder_path}` already exists.") + } else { + dir.create(folder_path) + log_info("Folder `{folder_path}` successfully created") + } +} +``` + +if (!dir.exists(model_results_folder)) + +```{r} +# Model report folder +model_report_folder <- here::here("model_validation") +create_folder(model_report_folder) + +# Model results folder +model_results_folder <- here::here("model_results") +create_folder(model_results_folder) + +# Results from current run +run_id <- paste0("run_", Sys.time()) %>% gsub(pattern=":| ", replacement = ".", x = .) +run_results_folder <- file.path(model_results_folder, run_id) +create_folder(run_results_folder) + +``` + +### Load data + +```{r} +# Load the mtcars dataset +dat0 <- mtcars %>% + mutate(# Category = sample(c("A", "B"), size=nrow(.), replace=TRUE) %>% factor + vals = mpg + cyl + disp/hp + rnorm(nrow(.), 3, 3), + Category = ifelse(vals >= median(vals) + 1, "A", "B") %>% factor + ) %>% + select(-vals) + + +dim(dat0) + +# Artificially increase number of features +n <- 40 +N = nrow(dat0) +for (k in 1:n) { + dat0[,paste0("x", k)] = rnorm(N) +} + +# Artificially increase number of records +dat <- dat0 +m <- 15 +for (k in 1:m) { + dat <- bind_rows(dat, dat0) +} + +dim(dat) +summary(dat) +summary(dat$Category) +dat + +``` + +# Run the modeling pipeline + +```{r} +model_res <- train_ml_model(training_df = dat, selected_algorithm = "random_forest", + model_mode = "classification", model_label="demo", + model_specifications = model_specifications, num_folds = 3, + grid_size = 10, + num_bootstraps = 4, + outcome_var = "Category", + features = colnames(dat) %>% .[. != "Category"], + do_parallel = FALSE, + show_plots = TRUE, + error_metric = "roc_auc" +) +``` + +```{r} + +``` diff --git a/renv.lock b/renv.lock new file mode 100644 index 0000000..131f9db --- /dev/null +++ b/renv.lock @@ -0,0 +1,1864 @@ +{ + "R": { + "Version": "4.2.2", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://cran.rstudio.com" + } + ] + }, + "Packages": { + "DALEX": { + "Package": "DALEX", + "Version": "2.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "082ea3e101d0fd99a30a75d1a15e2dd4", + "Requirements": [ + "ggplot2", + "iBreakDown", + "ingredients" + ] + }, + "DALEXtra": { + "Package": "DALEXtra", + "Version": "2.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e334e8eab5b36888c2d0427128670475", + "Requirements": [ + "DALEX", + "ggplot2", + "reticulate" + ] + }, + "DT": { + "Package": "DT", + "Version": "0.27", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3444e6ed78763f9f13aaa39f2481eb34", + "Requirements": [ + "crosstalk", + "htmltools", + "htmlwidgets", + "jquerylib", + "jsonlite", + "magrittr", + "promises" + ] + }, + "DataExplorer": { + "Package": "DataExplorer", + "Version": "0.8.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7ac7d2d1133bead1a5102819397e414d", + "Requirements": [ + "data.table", + "ggplot2", + "gridExtra", + "networkD3", + "reshape2", + "rmarkdown", + "scales" + ] + }, + "DiceDesign": { + "Package": "DiceDesign", + "Version": "1.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b7b812ae4484d4bbf0a0baac72e8fc01", + "Requirements": [] + }, + "GPfit": { + "Package": "GPfit", + "Version": "1.0-8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "29a7dccade1fd037c8262c2a239775eb", + "Requirements": [ + "lattice", + "lhs" + ] + }, + "KernSmooth": { + "Package": "KernSmooth", + "Version": "2.23-20", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8dcfa99b14c296bc9f1fd64d52fd3ce7", + "Requirements": [] + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-58.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "762e1804143a332333c054759f89a706", + "Requirements": [] + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.5-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "539dc0c0c05636812f1080f473d2c177", + "Requirements": [ + "lattice" + ] + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "470851b6d5d0ac559e9d01bb352b4021", + "Requirements": [] + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "45f0398006e83a5b10b72a90663d8d8c", + "Requirements": [] + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e749cae40fa9ef469b6050959517453c", + "Requirements": [] + }, + "RcppEigen": { + "Package": "RcppEigen", + "Version": "0.3.3.9.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1e035db628cefb315c571202d70202fe", + "Requirements": [ + "Matrix", + "Rcpp" + ] + }, + "RcppTOML": { + "Package": "RcppTOML", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c232938949fcd8126034419cc529333a", + "Requirements": [ + "Rcpp" + ] + }, + "SQUAREM": { + "Package": "SQUAREM", + "Version": "2021.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0cf10dab0d023d5b46a5a14387556891", + "Requirements": [] + }, + "backports": { + "Package": "backports", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c39fbec8a30d23e721980b8afb31984c", + "Requirements": [] + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "543776ae6848fde2f48ff3816d0628bc", + "Requirements": [] + }, + "bonsai": { + "Package": "bonsai", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c086fa23dfeac2d2b95f758dfa917c3d", + "Requirements": [ + "cli", + "dials", + "dplyr", + "glue", + "parsnip", + "purrr", + "rlang", + "tibble" + ] + }, + "brew": { + "Package": "brew", + "Version": "1.0-8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d69a786e85775b126bddbee185ae6084", + "Requirements": [] + }, + "brio": { + "Package": "brio", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "976cf154dfb043c012d87cddd8bca363", + "Requirements": [] + }, + "broom": { + "Package": "broom", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ab67f5ce0aa79b8db7ddba5cb0d4012d", + "Requirements": [ + "backports", + "dplyr", + "ellipsis", + "generics", + "glue", + "purrr", + "rlang", + "stringr", + "tibble", + "tidyr" + ] + }, + "bslib": { + "Package": "bslib", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a7fbf03946ad741129dc81098722fca1", + "Requirements": [ + "base64enc", + "cachem", + "htmltools", + "jquerylib", + "jsonlite", + "memoise", + "mime", + "rlang", + "sass" + ] + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "648c5b3d71e6a37e3043617489a0a0e9", + "Requirements": [ + "fastmap", + "rlang" + ] + }, + "callr": { + "Package": "callr", + "Version": "3.7.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9b2191ede20fa29828139b9900922e51", + "Requirements": [ + "R6", + "processx" + ] + }, + "class": { + "Package": "class", + "Version": "7.3-20", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "da09d82223e669d270e47ed24ac8686e", + "Requirements": [ + "MASS" + ] + }, + "cli": { + "Package": "cli", + "Version": "3.6.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3177a5a16c243adc199ba33117bd9657", + "Requirements": [] + }, + "clock": { + "Package": "clock", + "Version": "0.6.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "db6b0e88fa092982ecf56322b47be0fe", + "Requirements": [ + "cpp11", + "rlang", + "tzdb", + "vctrs" + ] + }, + "codetools": { + "Package": "codetools", + "Version": "0.2-18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "019388fc48e48b3da0d3a76ff94608a8", + "Requirements": [] + }, + "colorspace": { + "Package": "colorspace", + "Version": "2.1-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f20c47fd52fae58b4e377c37bb8c335b", + "Requirements": [] + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b6e3e947d1d7ebf3d2bdcea1bde63fe7", + "Requirements": [] + }, + "conflicted": { + "Package": "conflicted", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bb097fccb22d156624fd07cd2894ddb6", + "Requirements": [ + "cli", + "memoise", + "rlang" + ] + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ed588261931ee3be2c700d22e94a29ab", + "Requirements": [] + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e8a1e41acf02548751f45c718d55aa6a", + "Requirements": [] + }, + "crosstalk": { + "Package": "crosstalk", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6aa54f69598c32177e920eb3402e8293", + "Requirements": [ + "R6", + "htmltools", + "jsonlite", + "lazyeval" + ] + }, + "data.table": { + "Package": "data.table", + "Version": "1.14.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aecef50008ea7b57c76f1cb5c127fb02", + "Requirements": [] + }, + "desc": { + "Package": "desc", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21", + "Requirements": [ + "R6", + "cli", + "rprojroot" + ] + }, + "dials": { + "Package": "dials", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7f0431d342448a72a154c869f1d9c97e", + "Requirements": [ + "DiceDesign", + "cli", + "dplyr", + "glue", + "hardhat", + "lifecycle", + "pillar", + "purrr", + "rlang", + "scales", + "tibble", + "vctrs", + "withr" + ] + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8", + "Requirements": [ + "crayon" + ] + }, + "digest": { + "Package": "digest", + "Version": "0.6.31", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8b708f296afd9ae69f450f9640be8990", + "Requirements": [] + }, + "doParallel": { + "Package": "doParallel", + "Version": "1.0.17", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "451e5edf411987991ab6a5410c45011f", + "Requirements": [ + "foreach", + "iterators" + ] + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d3c34618017e7ae252d46d79a1b9ec32", + "Requirements": [ + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "pillar", + "rlang", + "tibble", + "tidyselect", + "vctrs" + ] + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077", + "Requirements": [ + "rlang" + ] + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.20", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4b68aa51edd89a0e044a66e75ae3cc6c", + "Requirements": [] + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1d9e7ad3c8312a192dea7d3db0274fde", + "Requirements": [] + }, + "farver": { + "Package": "farver", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8106d78941f34855c440ddb946b8f7a5", + "Requirements": [] + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77bd60a6157420d4ffa93b27cf6a58b8", + "Requirements": [] + }, + "foreach": { + "Package": "foreach", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "618609b42c9406731ead03adf5379850", + "Requirements": [ + "codetools", + "iterators" + ] + }, + "fs": { + "Package": "fs", + "Version": "1.6.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f4dcd23b67e33d851d2079f703e8b985", + "Requirements": [] + }, + "furrr": { + "Package": "furrr", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "da7a4c32196cb2262a41dd5a25d486ff", + "Requirements": [ + "future", + "globals", + "lifecycle", + "purrr", + "rlang", + "vctrs" + ] + }, + "future": { + "Package": "future", + "Version": "1.31.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f3f0fbe5ce9b77c002f8c5170790538a", + "Requirements": [ + "digest", + "globals", + "listenv", + "parallelly" + ] + }, + "future.apply": { + "Package": "future.apply", + "Version": "1.10.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a930c9ddc317f898e6f5bed7be8dd322", + "Requirements": [ + "future", + "globals" + ] + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "15e9634c0fcd294799e9b2e929ed1b86", + "Requirements": [] + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d494daf77c4aa7f084dbbe6ca5dcaca7", + "Requirements": [ + "MASS", + "cli", + "glue", + "gtable", + "isoband", + "lifecycle", + "mgcv", + "rlang", + "scales", + "tibble", + "vctrs", + "withr" + ] + }, + "globals": { + "Package": "globals", + "Version": "0.16.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "baa9585ab4ce47a9f4618e671778cc6f", + "Requirements": [ + "codetools" + ] + }, + "glue": { + "Package": "glue", + "Version": "1.6.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e", + "Requirements": [] + }, + "gower": { + "Package": "gower", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7a0051eef852c301b5efe2f7913dd45f", + "Requirements": [] + }, + "gridExtra": { + "Package": "gridExtra", + "Version": "2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7d7f283939f563670a697165b2cf5560", + "Requirements": [ + "gtable" + ] + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "36b4265fb818f6a342bed217549cd896", + "Requirements": [] + }, + "hardhat": { + "Package": "hardhat", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7cd2660e174e555b05aaeac979dee22b", + "Requirements": [ + "glue", + "rlang", + "tibble", + "vctrs" + ] + }, + "here": { + "Package": "here", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "24b224366f9c2e7534d2344d10d59211", + "Requirements": [ + "rprojroot" + ] + }, + "highr": { + "Package": "highr", + "Version": "0.10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "06230136b2d2b9ba5805e1963fa6e890", + "Requirements": [ + "xfun" + ] + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9d27e99cc90bd701c0a7a63e5923f9b7", + "Requirements": [ + "base64enc", + "digest", + "ellipsis", + "fastmap", + "rlang" + ] + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b677ee5954471eaa974c0d099a343a1a", + "Requirements": [ + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ] + }, + "iBreakDown": { + "Package": "iBreakDown", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b45a9f10d6a33995a3b47f62f3264262", + "Requirements": [ + "ggplot2" + ] + }, + "igraph": { + "Package": "igraph", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "14734eae03f062b55e794b07784aeddc", + "Requirements": [ + "Matrix", + "magrittr", + "pkgconfig", + "rlang" + ] + }, + "infer": { + "Package": "infer", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b1aa2741a03a90aa9d8187997cfc55c9", + "Requirements": [ + "broom", + "dplyr", + "generics", + "ggplot2", + "glue", + "magrittr", + "patchwork", + "purrr", + "rlang", + "tibble", + "tidyr" + ] + }, + "ingredients": { + "Package": "ingredients", + "Version": "2.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f9d2e6727e3f6d67a33361d4d2d15d42", + "Requirements": [ + "ggplot2", + "gridExtra", + "scales" + ] + }, + "ipred": { + "Package": "ipred", + "Version": "0.9-13", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "83aed0b881998c125aac48cab08141e4", + "Requirements": [ + "MASS", + "class", + "nnet", + "prodlim", + "rpart", + "survival" + ] + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0080607b4a1a7b28979aecef976d8bc2", + "Requirements": [] + }, + "iterators": { + "Package": "iterators", + "Version": "1.0.14", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8954069286b4b2b0d023d1b288dce978", + "Requirements": [] + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5aab57a3bd297eee1c1d862735972182", + "Requirements": [ + "htmltools" + ] + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a4269a09a9b865579b2635c77e572374", + "Requirements": [] + }, + "knitr": { + "Package": "knitr", + "Version": "1.42", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8329a9bcc82943c8069104d4be3ee22d", + "Requirements": [ + "evaluate", + "highr", + "xfun", + "yaml" + ] + }, + "labeling": { + "Package": "labeling", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3d5108641f47470611a32d0bdf357a72", + "Requirements": [] + }, + "later": { + "Package": "later", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7e7b457d7766bc47f2a5f21cc2984f8e", + "Requirements": [ + "Rcpp", + "rlang" + ] + }, + "lattice": { + "Package": "lattice", + "Version": "0.20-45", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b64cdbb2b340437c4ee047a1f4c4377b", + "Requirements": [] + }, + "lava": { + "Package": "lava", + "Version": "1.7.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c2a096715467f53104d989f54afd0ee1", + "Requirements": [ + "SQUAREM", + "future.apply", + "numDeriv", + "progressr", + "survival" + ] + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d908914ae53b04d4c0c0fd72ecc35370", + "Requirements": [] + }, + "lhs": { + "Package": "lhs", + "Version": "1.1.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a007ff66aa9d478e220bf0493a7b1d95", + "Requirements": [ + "Rcpp" + ] + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "001cecbeac1cff9301bdc3775ee46a86", + "Requirements": [ + "cli", + "glue", + "rlang" + ] + }, + "lightgbm": { + "Package": "lightgbm", + "Version": "3.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e6c3413a4762e6c0cb3a2d32da82a994", + "Requirements": [ + "Matrix", + "R6", + "data.table", + "jsonlite" + ] + }, + "listenv": { + "Package": "listenv", + "Version": "0.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4fbd3679ec8ee169ba28d4b1ea7d0e8f", + "Requirements": [] + }, + "lubridate": { + "Package": "lubridate", + "Version": "1.9.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e25f18436e3efd42c7c590a1c4c15390", + "Requirements": [ + "generics", + "timechange" + ] + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7ce2733a9826b3aeb1775d56fd305472", + "Requirements": [] + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c", + "Requirements": [ + "cachem", + "rlang" + ] + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.8-41", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6b3904f13346742caa3e82dd0303d4ad", + "Requirements": [ + "Matrix", + "nlme" + ] + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "18e9c28c1d3ca1560ce30658b22ce104", + "Requirements": [] + }, + "modeldata": { + "Package": "modeldata", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "df65cdee10e24635c6491ed5a98a31ef", + "Requirements": [ + "MASS", + "dplyr", + "purrr", + "rlang", + "tibble" + ] + }, + "modelenv": { + "Package": "modelenv", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ecf47535c467857cf4b781647b18edf0", + "Requirements": [ + "glue", + "rlang", + "tibble", + "vctrs" + ] + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6dfe8bf774944bd5595785e3229d8771", + "Requirements": [ + "colorspace" + ] + }, + "networkD3": { + "Package": "networkD3", + "Version": "0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "38310ec4ddb1398359abdd603c151067", + "Requirements": [ + "htmlwidgets", + "igraph", + "magrittr" + ] + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-160", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "02e3c6e7df163aafa8477225e6827bc5", + "Requirements": [ + "lattice" + ] + }, + "nnet": { + "Package": "nnet", + "Version": "7.3-18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "170da2130d5332bea7d6ede01875ba1d", + "Requirements": [] + }, + "numDeriv": { + "Package": "numDeriv", + "Version": "2016.8-1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "df58958f293b166e4ab885ebcad90e02", + "Requirements": [] + }, + "openxlsx": { + "Package": "openxlsx", + "Version": "4.2.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c03b4c18d42da881fb8e15a085c2b9d6", + "Requirements": [ + "Rcpp", + "stringi", + "zip" + ] + }, + "parallelly": { + "Package": "parallelly", + "Version": "1.34.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2a795ec0ddbfe465ca0d6471039631bf", + "Requirements": [] + }, + "parsnip": { + "Package": "parsnip", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9cf8cb344a158566a0c785db7b72a316", + "Requirements": [ + "cli", + "dplyr", + "generics", + "ggplot2", + "globals", + "glue", + "hardhat", + "lifecycle", + "magrittr", + "pillar", + "prettyunits", + "purrr", + "rlang", + "tibble", + "tidyr", + "vctrs", + "withr" + ] + }, + "patchwork": { + "Package": "patchwork", + "Version": "1.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "63b611e9d909a9ed057639d9c3b77152", + "Requirements": [ + "ggplot2", + "gtable" + ] + }, + "pillar": { + "Package": "pillar", + "Version": "1.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f2316df30902c81729ae9de95ad5a608", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "vctrs" + ] + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "01f28d4278f15c76cddbea05899c5d6f", + "Requirements": [] + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6b0c222c5071efe0f3baf3dae9aa40e2", + "Requirements": [ + "cli", + "crayon", + "desc", + "fs", + "glue", + "rlang", + "rprojroot", + "withr" + ] + }, + "plyr": { + "Package": "plyr", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d744387aef9047b0b48be2933d78e862", + "Requirements": [ + "Rcpp" + ] + }, + "png": { + "Package": "png", + "Version": "0.1-8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bd54ba8a0a5faded999a7aab6e46b374", + "Requirements": [] + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f", + "Requirements": [] + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e", + "Requirements": [] + }, + "processx": { + "Package": "processx", + "Version": "3.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a33ee2d9bf07564efb888ad98410da84", + "Requirements": [ + "R6", + "ps" + ] + }, + "prodlim": { + "Package": "prodlim", + "Version": "2019.11.13", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c243bf70db3a6631a0c8783152fb7db9", + "Requirements": [ + "KernSmooth", + "Rcpp", + "lava", + "survival" + ] + }, + "progressr": { + "Package": "progressr", + "Version": "0.13.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "376a8ebcc878f9c1395e212548fc297a", + "Requirements": [ + "digest" + ] + }, + "promises": { + "Package": "promises", + "Version": "1.2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4ab2c43adb4d4699cf3690acd378d75d", + "Requirements": [ + "R6", + "Rcpp", + "later", + "magrittr", + "rlang" + ] + }, + "ps": { + "Package": "ps", + "Version": "1.7.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "68dd03d98a5efd1eb3012436de45ba83", + "Requirements": [] + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d71c815267c640f17ddbf7f16144b4bb", + "Requirements": [ + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ] + }, + "ranger": { + "Package": "ranger", + "Version": "0.14.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fd61f8408066c5a659c6a95c5a73bfc7", + "Requirements": [ + "Matrix", + "Rcpp", + "RcppEigen" + ] + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5e3c5dc0b071b21fa128676560dbe94d", + "Requirements": [] + }, + "recipes": { + "Package": "recipes", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6ae919cd54d95128965d6ceeb1eab885", + "Requirements": [ + "Matrix", + "cli", + "clock", + "dplyr", + "ellipsis", + "generics", + "glue", + "gower", + "hardhat", + "ipred", + "lifecycle", + "lubridate", + "magrittr", + "purrr", + "rlang", + "tibble", + "tidyr", + "tidyselect", + "timeDate", + "vctrs", + "withr" + ] + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "76c9e04c712a05848ae7a23d2f170a40", + "Requirements": [ + "tibble" + ] + }, + "renv": { + "Package": "renv", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c9e8442ab69bc21c9697ecf856c1e6c7", + "Requirements": [] + }, + "reshape2": { + "Package": "reshape2", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bb5996d0bd962d214a11140d77589917", + "Requirements": [ + "Rcpp", + "plyr", + "stringr" + ] + }, + "reticulate": { + "Package": "reticulate", + "Version": "1.28", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "86c441bf33e1d608db773cb94b848458", + "Requirements": [ + "Matrix", + "Rcpp", + "RcppTOML", + "here", + "jsonlite", + "png", + "rappdirs", + "withr" + ] + }, + "rlang": { + "Package": "rlang", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4ed1f8336c8d52c3e750adcdc57228a7", + "Requirements": [] + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.20", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "716fde5382293cc94a71f68c85b78d19", + "Requirements": [ + "bslib", + "evaluate", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "stringr", + "tinytex", + "xfun", + "yaml" + ] + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7b153c746193b143c14baa072bae4e27", + "Requirements": [ + "R6", + "brew", + "cli", + "commonmark", + "cpp11", + "desc", + "knitr", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "withr", + "xml2" + ] + }, + "rpart": { + "Package": "rpart", + "Version": "4.1.19", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b3c892a81783376cc2204af0f5805a80", + "Requirements": [] + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1de7ab598047a87bba48434ba35d497d", + "Requirements": [] + }, + "rsample": { + "Package": "rsample", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cb0c54ebc268ec382be8e4d4a8c34557", + "Requirements": [ + "dplyr", + "furrr", + "generics", + "glue", + "pillar", + "purrr", + "rlang", + "slider", + "tibble", + "tidyr", + "tidyselect", + "vctrs" + ] + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.14", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "690bd2acc42a9166ce34845884459320", + "Requirements": [] + }, + "sass": { + "Package": "sass", + "Version": "0.4.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2bb4371a4c80115518261866eab6ab11", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ] + }, + "scales": { + "Package": "scales", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "906cb23d2f1c5680b8ce439b44c6fa63", + "Requirements": [ + "R6", + "RColorBrewer", + "farver", + "labeling", + "lifecycle", + "munsell", + "rlang", + "viridisLite" + ] + }, + "slider": { + "Package": "slider", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c1c73df260af9e1e3692eb3b8e1ecb88", + "Requirements": [ + "cli", + "rlang", + "vctrs", + "warp" + ] + }, + "stringi": { + "Package": "stringi", + "Version": "1.7.12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ca8bd84263c77310739d2cf64d84d7c9", + "Requirements": [] + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8", + "Requirements": [ + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ] + }, + "survival": { + "Package": "survival", + "Version": "3.4-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "04411ae66ab4659230c067c32966fc20", + "Requirements": [ + "Matrix" + ] + }, + "testthat": { + "Package": "testthat", + "Version": "3.1.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7910146255835c66e9eb272fb215248d", + "Requirements": [ + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "ellipsis", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "waldo", + "withr" + ] + }, + "tibble": { + "Package": "tibble", + "Version": "3.1.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "56b6934ef0f8c68225949a8672fe1a8f", + "Requirements": [ + "fansi", + "lifecycle", + "magrittr", + "pillar", + "pkgconfig", + "rlang", + "vctrs" + ] + }, + "tidymodels": { + "Package": "tidymodels", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7e36c824e3208cc87f50eb5d8ce2ce42", + "Requirements": [ + "broom", + "cli", + "conflicted", + "dials", + "dplyr", + "ggplot2", + "hardhat", + "infer", + "modeldata", + "parsnip", + "purrr", + "recipes", + "rlang", + "rsample", + "rstudioapi", + "tibble", + "tidyr", + "tune", + "workflows", + "workflowsets", + "yardstick" + ] + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e47debdc7ce599b070c8e78e8ac0cfcf", + "Requirements": [ + "cli", + "cpp11", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "purrr", + "rlang", + "stringr", + "tibble", + "tidyselect", + "vctrs" + ] + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "79540e5fcd9e0435af547d885f184fd5", + "Requirements": [ + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ] + }, + "timeDate": { + "Package": "timeDate", + "Version": "4022.108", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3f7918d2b36c17ffe07cddba6458453e", + "Requirements": [] + }, + "timechange": { + "Package": "timechange", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8548b44f79a35ba1791308b61e6012d7", + "Requirements": [ + "cpp11" + ] + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.44", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c0f007e2eeed7722ce13d42b84a22e07", + "Requirements": [ + "xfun" + ] + }, + "tune": { + "Package": "tune", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "317fa71b768a70fdd575b6d6b0f9615d", + "Requirements": [ + "GPfit", + "cli", + "dials", + "dplyr", + "foreach", + "generics", + "ggplot2", + "glue", + "hardhat", + "lifecycle", + "parsnip", + "purrr", + "recipes", + "rlang", + "rsample", + "tibble", + "tidyr", + "tidyselect", + "vctrs", + "withr", + "workflows", + "yardstick" + ] + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b2e1cbce7c903eaf23ec05c58e59fb5e", + "Requirements": [ + "cpp11" + ] + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1fe17157424bb09c48a8b3b550c753bc", + "Requirements": [] + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e4ffa94ceed5f124d429a5a5f0f5b378", + "Requirements": [ + "cli", + "glue", + "lifecycle", + "rlang" + ] + }, + "vip": { + "Package": "vip", + "Version": "0.3.2.9000", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "koalaverse", + "RemoteRepo": "vip", + "RemoteRef": "master", + "RemoteSha": "78512cdaa7bbe43e41d855e004df5efdaf7db9ed", + "Hash": "15ba007b3bb4f1caa9137e3e2103cf1a", + "Requirements": [ + "foreach", + "ggplot2", + "magrittr", + "tibble" + ] + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "62f4b5da3e08d8e5bcba6cac15603f70", + "Requirements": [] + }, + "waldo": { + "Package": "waldo", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "035fba89d0c86e2113120f93301b98ad", + "Requirements": [ + "cli", + "diffobj", + "fansi", + "glue", + "rematch2", + "rlang", + "tibble" + ] + }, + "warp": { + "Package": "warp", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2982481615756e24e79fee95bdc95daa", + "Requirements": [] + }, + "withr": { + "Package": "withr", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c0e49a9760983e81e55cdd9be92e7182", + "Requirements": [] + }, + "workflows": { + "Package": "workflows", + "Version": "1.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e8dbcbfad62d4018386c2dbc1ad5185f", + "Requirements": [ + "cli", + "generics", + "glue", + "hardhat", + "lifecycle", + "modelenv", + "parsnip", + "rlang", + "tidyselect", + "vctrs" + ] + }, + "workflowsets": { + "Package": "workflowsets", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "448a0d2d50cda4a7e843bda1ac33d634", + "Requirements": [ + "cli", + "dplyr", + "generics", + "ggplot2", + "glue", + "hardhat", + "lifecycle", + "parsnip", + "pillar", + "prettyunits", + "purrr", + "rlang", + "rsample", + "tibble", + "tidyr", + "tune", + "vctrs", + "withr", + "workflows" + ] + }, + "xfun": { + "Package": "xfun", + "Version": "0.37", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a6860e1400a8fd1ddb6d9b4230cc34ab", + "Requirements": [] + }, + "xgboost": { + "Package": "xgboost", + "Version": "1.7.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4f00baeb6a030e7f058994e2796cdf82", + "Requirements": [ + "Matrix", + "data.table", + "jsonlite" + ] + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "40682ed6a969ea5abfd351eb67833adc", + "Requirements": [] + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0d0056cc5383fbc240ccd0cb584bf436", + "Requirements": [] + }, + "yardstick": { + "Package": "yardstick", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "dccdce88dc8bcc4bcf091742496d6ddd", + "Requirements": [ + "dplyr", + "generics", + "hardhat", + "rlang", + "tidyselect", + "vctrs" + ] + }, + "zip": { + "Package": "zip", + "Version": "2.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c42bfcec3fa6a0cce17ce1f8bc684f88", + "Requirements": [] + } + } +} diff --git a/renv_setup/renv_install_packages.R b/renv_setup/renv_install_packages.R new file mode 100644 index 0000000..59376a1 --- /dev/null +++ b/renv_setup/renv_install_packages.R @@ -0,0 +1,60 @@ + +if (FALSE) { + # Install the renv package + install.packages('renv') + + # Initialize the renv + renv::init(bare = TRUE) +} + + +# Activate the environment +renv::activate() + + +################################## +##### Use renv to install packages +################################## + +# General +renv::install("tidyverse") +renv::install("reshape2") +renv::install("DT") +renv::install("markdown") +renv::install("daroczig/logger") +renv::install("here") +renv::install("roxygen2") +renv::install("testthat") # may not need this + +# Excel spreadsheet +renv::install("openxlsx") + +# Plotting +renv::install("gridExtra") + +# Modeling and automated EDA +renv::install("tidymodels") +renv::install("xgboost") +renv::install("koalaverse/vip") +renv::install("ranger") +renv::install("lightgbm") +renv::install("bonsai") +renv::install("DataExplorer") +renv::install("DALEXtra") +renv::install("caret") + +# Parallel processing +renv::install("parallelly") +renv::install("doParallel") + +# Other +# renv::install("vetiver") +#renv::install("") +#renv::install("") +#renv::install("") + +renv::status() + +renv::snapshot() + +renv::status() diff --git a/tidymodels-ML-workflow.Rproj b/tidymodels-ML-workflow.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/tidymodels-ML-workflow.Rproj @@ -0,0 +1,13 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX