LazyBoostingClassifier.Rd
Lazy Generic Boosting Classifier (AutoML Hold-out set validation)
LazyBoostingClassifier(
verbose = 0,
ignore_warnings = TRUE,
custom_metric = NULL,
predictions = FALSE,
sort_by = "Accuracy",
random_state = 42,
estimators = "all",
preprocess = FALSE,
n_jobs = NULL
)
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
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)
#> [[1]]
#> Accuracy
#> RandomForestClassifier 0.9701493
#> GenericBooster(TransformedTargetRegressor) 0.9253731
#> GenericBooster(MultiTask(TweedieRegressor)) 0.9253731
#> GenericBooster(LinearRegression) 0.9253731
#> GenericBooster(DecisionTreeRegressor) 0.9104478
#> GenericBooster(Ridge) 0.9104478
#> GenericBooster(RidgeCV) 0.9104478
#> GenericBooster(KNeighborsRegressor) 0.9104478
#> GenericBooster(MultiTask(SGDRegressor)) 0.8805970
#> GenericBooster(ExtraTreeRegressor) 0.8805970
#> XGBClassifier 0.8507463
#> GenericBooster(MultiTask(LinearSVR)) 0.8208955
#> GenericBooster(MultiTask(PassiveAggressiveRegressor)) 0.7313433
#> GenericBooster(MultiTask(BayesianRidge)) 0.7164179
#> GenericBooster(MultiTask(QuantileRegressor)) 0.3880597
#> GenericBooster(MultiTaskElasticNet) 0.2537313
#> GenericBooster(DummyRegressor) 0.2388060
#> GenericBooster(ElasticNet) 0.2388060
#> GenericBooster(MultiTaskLasso) 0.2388060
#> GenericBooster(Lasso) 0.2388060
#> GenericBooster(LassoLars) 0.2388060
#> Balanced Accuracy ROC AUC
#> RandomForestClassifier 0.9738462 <NA>
#> GenericBooster(TransformedTargetRegressor) 0.9353846 <NA>
#> GenericBooster(MultiTask(TweedieRegressor)) 0.9348718 <NA>
#> GenericBooster(LinearRegression) 0.9353846 <NA>
#> GenericBooster(DecisionTreeRegressor) 0.9205128 <NA>
#> GenericBooster(Ridge) 0.9225641 <NA>
#> GenericBooster(RidgeCV) 0.9225641 <NA>
#> GenericBooster(KNeighborsRegressor) 0.9205128 <NA>
#> GenericBooster(MultiTask(SGDRegressor)) 0.8969231 <NA>
#> GenericBooster(ExtraTreeRegressor) 0.8943590 <NA>
#> XGBClassifier 0.8676923 <NA>
#> GenericBooster(MultiTask(LinearSVR)) 0.8461538 <NA>
#> GenericBooster(MultiTask(PassiveAggressiveRegressor)) 0.7692308 <NA>
#> GenericBooster(MultiTask(BayesianRidge)) 0.7564103 <NA>
#> GenericBooster(MultiTask(QuantileRegressor)) 0.3333333 <NA>
#> GenericBooster(MultiTaskElasticNet) 0.3466667 <NA>
#> GenericBooster(DummyRegressor) 0.3333333 <NA>
#> GenericBooster(ElasticNet) 0.3333333 <NA>
#> GenericBooster(MultiTaskLasso) 0.3333333 <NA>
#> GenericBooster(Lasso) 0.3333333 <NA>
#> GenericBooster(LassoLars) 0.3333333 <NA>
#> F1 Score Time Taken
#> RandomForestClassifier 0.97014925 1.29183984
#> GenericBooster(TransformedTargetRegressor) 0.92520072 0.43604684
#> GenericBooster(MultiTask(TweedieRegressor)) 0.92537313 4.97677994
#> GenericBooster(LinearRegression) 0.92520072 0.35617900
#> GenericBooster(DecisionTreeRegressor) 0.90975248 0.43874002
#> GenericBooster(Ridge) 0.91003317 0.34598923
#> GenericBooster(RidgeCV) 0.91003317 0.44731498
#> GenericBooster(KNeighborsRegressor) 0.90975248 1.23405910
#> GenericBooster(MultiTask(SGDRegressor)) 0.87920645 2.29775286
#> GenericBooster(ExtraTreeRegressor) 0.87966997 0.36658406
#> XGBClassifier 0.84950709 0.34738040
#> GenericBooster(MultiTask(LinearSVR)) 0.81136254 3.51201010
#> GenericBooster(MultiTask(PassiveAggressiveRegressor)) 0.69578578 2.71900010
#> GenericBooster(MultiTask(BayesianRidge)) 0.67382455 3.52097988
#> GenericBooster(MultiTask(QuantileRegressor)) 0.21697962 6.75926590
#> GenericBooster(MultiTaskElasticNet) 0.15081187 0.57309294
#> GenericBooster(DummyRegressor) 0.09206977 0.01698399
#> GenericBooster(ElasticNet) 0.09206977 0.03239417
#> GenericBooster(MultiTaskLasso) 0.09206977 0.03940296
#> GenericBooster(Lasso) 0.09206977 0.03305292
#> GenericBooster(LassoLars) 0.09206977 0.01887298
#>
#> [[2]]
#> Accuracy
#> RandomForestClassifier 0.9701493
#> GenericBooster(TransformedTargetRegressor) 0.9253731
#> GenericBooster(MultiTask(TweedieRegressor)) 0.9253731
#> GenericBooster(LinearRegression) 0.9253731
#> GenericBooster(DecisionTreeRegressor) 0.9104478
#> GenericBooster(Ridge) 0.9104478
#> GenericBooster(RidgeCV) 0.9104478
#> GenericBooster(KNeighborsRegressor) 0.9104478
#> GenericBooster(MultiTask(SGDRegressor)) 0.8805970
#> GenericBooster(ExtraTreeRegressor) 0.8805970
#> XGBClassifier 0.8507463
#> GenericBooster(MultiTask(LinearSVR)) 0.8208955
#> GenericBooster(MultiTask(PassiveAggressiveRegressor)) 0.7313433
#> GenericBooster(MultiTask(BayesianRidge)) 0.7164179
#> GenericBooster(MultiTask(QuantileRegressor)) 0.3880597
#> GenericBooster(MultiTaskElasticNet) 0.2537313
#> GenericBooster(DummyRegressor) 0.2388060
#> GenericBooster(ElasticNet) 0.2388060
#> GenericBooster(MultiTaskLasso) 0.2388060
#> GenericBooster(Lasso) 0.2388060
#> GenericBooster(LassoLars) 0.2388060
#> Balanced Accuracy ROC AUC
#> RandomForestClassifier 0.9738462 <NA>
#> GenericBooster(TransformedTargetRegressor) 0.9353846 <NA>
#> GenericBooster(MultiTask(TweedieRegressor)) 0.9348718 <NA>
#> GenericBooster(LinearRegression) 0.9353846 <NA>
#> GenericBooster(DecisionTreeRegressor) 0.9205128 <NA>
#> GenericBooster(Ridge) 0.9225641 <NA>
#> GenericBooster(RidgeCV) 0.9225641 <NA>
#> GenericBooster(KNeighborsRegressor) 0.9205128 <NA>
#> GenericBooster(MultiTask(SGDRegressor)) 0.8969231 <NA>
#> GenericBooster(ExtraTreeRegressor) 0.8943590 <NA>
#> XGBClassifier 0.8676923 <NA>
#> GenericBooster(MultiTask(LinearSVR)) 0.8461538 <NA>
#> GenericBooster(MultiTask(PassiveAggressiveRegressor)) 0.7692308 <NA>
#> GenericBooster(MultiTask(BayesianRidge)) 0.7564103 <NA>
#> GenericBooster(MultiTask(QuantileRegressor)) 0.3333333 <NA>
#> GenericBooster(MultiTaskElasticNet) 0.3466667 <NA>
#> GenericBooster(DummyRegressor) 0.3333333 <NA>
#> GenericBooster(ElasticNet) 0.3333333 <NA>
#> GenericBooster(MultiTaskLasso) 0.3333333 <NA>
#> GenericBooster(Lasso) 0.3333333 <NA>
#> GenericBooster(LassoLars) 0.3333333 <NA>
#> F1 Score Time Taken
#> RandomForestClassifier 0.97014925 1.29183984
#> GenericBooster(TransformedTargetRegressor) 0.92520072 0.43604684
#> GenericBooster(MultiTask(TweedieRegressor)) 0.92537313 4.97677994
#> GenericBooster(LinearRegression) 0.92520072 0.35617900
#> GenericBooster(DecisionTreeRegressor) 0.90975248 0.43874002
#> GenericBooster(Ridge) 0.91003317 0.34598923
#> GenericBooster(RidgeCV) 0.91003317 0.44731498
#> GenericBooster(KNeighborsRegressor) 0.90975248 1.23405910
#> GenericBooster(MultiTask(SGDRegressor)) 0.87920645 2.29775286
#> GenericBooster(ExtraTreeRegressor) 0.87966997 0.36658406
#> XGBClassifier 0.84950709 0.34738040
#> GenericBooster(MultiTask(LinearSVR)) 0.81136254 3.51201010
#> GenericBooster(MultiTask(PassiveAggressiveRegressor)) 0.69578578 2.71900010
#> GenericBooster(MultiTask(BayesianRidge)) 0.67382455 3.52097988
#> GenericBooster(MultiTask(QuantileRegressor)) 0.21697962 6.75926590
#> GenericBooster(MultiTaskElasticNet) 0.15081187 0.57309294
#> GenericBooster(DummyRegressor) 0.09206977 0.01698399
#> GenericBooster(ElasticNet) 0.09206977 0.03239417
#> GenericBooster(MultiTaskLasso) 0.09206977 0.03940296
#> GenericBooster(Lasso) 0.09206977 0.03305292
#> GenericBooster(LassoLars) 0.09206977 0.01887298
#>