I'm trying to select the best regression tree using the "mae" or the "mape" metrics, but doesn't seem to recognize it.
My try:
best_complexity <- select_best(tune_res, metric = "mae")
reg_tree_final <- finalize_workflow(reg_tree_wf, best_complexity)
reg_tree_final_fit <- fit(reg_tree_final, data = Boston_train)
reg_tree_final_fit
In the other hand, my code using the "rmse" metric i'ts working just fine. Any suggestion would be great!