Anyone know the best packages to build a decision tree in Rstudio v3.3?

I want to look at some data-driven segmentation for my data. I was thinking of doing chaid analysis (mainly because this is why I've done in the past).

I've looked around myself, but can't find the best package for this version!

  • $\begingroup$ Which packages have you looked at? What did you not like about them? $\endgroup$ – Elias Strehle Feb 12 '18 at 11:36

The "best" package depends on your goals and data really.

A few tree / forest packages that I've come across:

  1. randomForest - an implementation of the original algorithm
  2. ranger - a flexible implementation designed to run on high-dimensional data (my personal favourite forest package)
  3. party's ctree / cforest functions - conditional inference trees / forests
  4. rpart

Some of these packages focus on forests rather than trees; you can coerce the forest algorithm into building a tree by flexing appropriate parameters.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.