The goal of MicEcon is to …
if(!require(devtools)){
install.packages("devtools")
}
if(!require(catboost)){
devtools::install_github('catboost/catboost', subdir = 'catboost/R-package')
}
devtools::install_github("Akai01/MicEcon")
This is a basic example which shows you how to solve a common problem:
# A toy example
library(MicEcon)
data(iris, package = "datasets")
fit <- auto_catboost_reg(
iris,
label_col_name = "Petal.Length",
cat_features = "Species",
has_time = FALSE,
fold_count = 3,
type = "Classical",
partition_random_seed = 0,
shuffle = TRUE,
stratified = FALSE,
early_stopping_rounds = NULL,
iterations = list(lower = 100, upper = 110),
learning_rate = list(lower = 0.001, upper = 0.05),
l2_leaf_reg = list(lower = 0, upper = 5),
depth = list(lower = 1, upper = 10),
bagging_temperature = list(lower = 0, upper = 100),
rsm = list(lower = 0, upper = 1),
border_count = list(lower = 1, upper = 254),
logging_level = 'Silent',
bo_iters = 2
)
#> Loading required namespace: catboost
varimp <- get_var_imp(fit$model)
plot_varimp(varimp)