Hey guys, i want to sort the variable but i dont know how to do that.
This is my code:
imp_train_bc <- as.data.frame(fit_train_bc$variable.importance)
colnames(imp_train_bc) <- c("Importance")
ggplot(imp_train_bc) + geom_bar(aes(x = Importance, y = rownames(imp_train_bc)), stat = "identity", width = 0.05) + geom_point(aes(x=Importance, y= rownames(imp_train_bc)), col = "Orange")
And this is what the result looks like: