Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ctrl = rpart.control(maxdepth=6)
- dt_model <- rpart(formula, data, method='class',control=ctrl)
- # this doesn't work
- fit <- rpart(class ~ ., data = df, method = "class", control = ("maxdepth = 1"))
- # changing maxdepth here effects your tree depth.
- rpart(class ~ ., data = df, method = "class", control = list(maxdepth = 1))
Add Comment
Please, Sign In to add comment