Decision tree

A decision tree predicts by asking a series of questions about the features, each node splitting the data according to a threshold that best separates the targets. It is readable, handles nonlinear relationships, and does not require scaling, but it overfits easily if it is too deep.

Example

DecisionTreeClassifier(max_depth=4).fit(X_train, y_train)

Related concepts

The whole glossary