I'm creating rules from the decision tree generated by mlr package wrapper learner classif.rpart, how to print the rules as in rpart.rules and how to visualize as in rpart.plot
Created the learner using classif.rpart, trained and fitted the model, tried to plot using rpart.plot and saying error as Not an rpart object
dt_mod <- mlr::train(fused_dt, classif.task)
dt_mod
library(rpart.plot)
rpart.plot(dt_mod$learner.model, roundint=FALSE, varlen=3, type = 3, clip.right.labs = FALSE, yesno = 2)
rpart.rules(dt_mod$learner.model, roundint = FALSE)
I except the rules to be listed and tree to be visualized