Is there a function to extract the parameters and suggested parameter ranges from a specification:
m_spec <-
boost_tree() %>%
set_engine("xgboost") %>%
set_mode("classification")
I am building a shiny application and would like to know the arguments which are available to populate based on the dynamically selected model type and engine which may vary depending on user selection. It seems like all the tune grid functions require knowledge of parameters prior, in other words I have to build a table of parameter mappings by method and manage this in my application.
My expectation of m_spec is to get a list of parameters - eta, lambda, nrounds, etc. with suggested ranges. Then when I change to rf I get mtry, etc. These would just be data in a tibble. Further I would like to get other model specific information prior like acceptable importance values by model i.e. "impurity".
show_model_info("boost_tree") gives me what I want but how do I get this into a vector data frame?
arguments:
xgboost:
tree_depth --> max_depth
trees --> nrounds
learn_rate --> eta
mtry --> colsample_bynode
min_n --> min_child_weight
loss_reduction --> gamma
sample_size --> subsample
stop_iter --> early_stop
C5.0:
trees --> trials
min_n --> minCases
sample_size --> sample
spark:
tree_depth --> max_depth
trees --> max_iter
learn_rate --> step_size
mtry --> feature_subset_strategy
min_n --> min_instances_per_node
loss_reduction --> min_info_gain
sample_size --> subsampling_rate