LazyBoostingClassifier.RdLazy Generic Boosting Classifier (AutoML Hold-out set validation)
LazyBoostingClassifier(
verbose = 0,
ignore_warnings = TRUE,
custom_metric = NULL,
predictions = FALSE,
sort_by = "Accuracy",
random_state = 42L,
estimators = "all",
preprocess = FALSE,
n_jobs = NULL,
venv_path = "./venv",
...
)int, progress bar (yes = 1) or not (no = 0) (currently).
bool, ignore warnings.
function, custom metric.
bool, return predictions.
str, sort by metric.
int, random state.
str, estimators to use. List of names for custom, or just 'all'.
bool, preprocess data or not.
int, number of jobs.
LazyBoostingClassifier object
# See https://thierrymoudiki.github.io/blog/2024/10/14/r/genericboosting-r for advanced examples
if (FALSE) { # \dontrun{
library(mlsauce)
library(datasets)
data(iris)
X <- as.matrix(iris[, 1:4])
y <- as.integer(iris[, 5]) - 1L
n <- dim(X)[1]
p <- dim(X)[2]
set.seed(21341)
train_index <- sample(x = 1:n, size = floor(0.8*n), replace = TRUE)
test_index <- -train_index
X_train <- as.matrix(X[train_index, ])
y_train <- as.integer(y[train_index])
X_test <- as.matrix(X[test_index, ])
y_test <- as.integer(y[test_index])
obj <- LazyBoostingClassifier(verbose=0, ignore_warnings=TRUE,
custom_metric=NULL, preprocess=FALSE)
obj$fit(X_train, X_test, y_train, y_test)
} # }