8

My question is can we choose what Decision Tree algorithm to use in sklearn?

In user guide of sklearn, it mentions optimised version of the CART algorithm is used.

Can we change to other algorithms such as C4.5?

  • What exactly do you mean by that? Missing values and categorical variables are not currently handled, and there is no post-pruning, only pre-pruning. C4.5 is not really an algorithm, it's a program, right? – Andreas Mueller Dec 11 '15 at 20:02

2 Answers2

4

No. See documentation

scikit-learn uses an optimised version of the CART algorithm.
Atilla Ozgur
  • 14,339
  • 3
  • 49
  • 69
1

But there is a params criterion that we can choose to use "gini" or "entropy":

clf = tree.DecisionTreeClassifier(criterion="entropy")

criterion : string, optional (default=”gini”) The function to measure the quality of a split. Supported criteria are “gini” for the Gini impurity and “entropy” for the information gain.

see Docs

zhaoqing
  • 775
  • 8
  • 8