Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we choose what Decision Tree algorithm to use in sklearn?

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?

like image 203
tickly potato Avatar asked Dec 11 '15 18:12

tickly potato


People also ask

Which decision tree algorithm is used in sklearn?

Which one is implemented in scikit-learn? ID3 (Iterative Dichotomiser 3) was developed in 1986 by Ross Quinlan. The algorithm creates a multiway tree, finding for each node (i.e. in a greedy manner) the categorical feature that will yield the largest information gain for categorical targets.

Which algorithm for decision tree can handle?

A decision tree is a non-parametric supervised learning algorithm, which is utilized for both classification and regression tasks. It has a hierarchical, tree structure, which consists of a root node, branches, internal nodes and leaf nodes.

What kind of dataset is ideal for applying the decision tree model?

Summary. Decision trees are used for handling non-linear data sets effectively.


2 Answers

No. See documentation

scikit-learn uses an optimised version of the CART algorithm.
like image 94
Atilla Ozgur Avatar answered Sep 21 '22 05:09

Atilla Ozgur


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

like image 26
zhaoqing Avatar answered Sep 22 '22 05:09

zhaoqing