@apremgeorge wrote:
makeatree <- makeLearner("classif.rpart", predict.type = "response") set_cv <- makeResampleDesc("CV",iters = 3L) gs <- makeParamSet(makeIntegerParam("minsplit",lower = 10, upper = 50),makeIntegerParam("minbucket", lower = 5, upper = 50),makeNumericParam("cp", lower = 0.001, upper = 0.2)) gscontrol <- makeTuneControlGrid() stune <- tuneParams(learner = makeatree, resampling = set_cv, task = trainTask, par.set = gs, control = gscontrol, measures = acc) t.tree <- setHyperPars(makeatree, par.vals = stune$x) t.rpart <- train(t.tree, trainTask) tpmodel <- predict(t.rpart, testTask)
here Visualizing the tree model in
rpart.plot()
will not work as this is not rpart object, Thanks in advance, Any help is much appreciated, Thanks in Advance
Posts: 1
Participants: 1