This is a powerful model, capable of finding complex nonlinear relationships in the data
A nice feature in scikit-learn is that it allows us to export the decision tree as a .dot file after training, which we can visualize using the GraphViz program. (Python Machine Learning - Building a decision tree)
we have to be careful since the deeper the decision tree, the more complex the decision boundary becomes, which can easily result in overfitting. Using scikit-learn, we will now train a decision tree with a maximum depth of 3 using entropy as a criterion for impurity.
Like SVMs,Decision Treesare versatile Machine Learning algorithms that can perform both classification and regression tasks, and even multioutput tasks.