DT is a flowchart like structure where each node denote a test on attribute, each branch denote an outcome of a test and each leaf node holds the class label
- Tree like a model for decision
- works well at both classification and Regression
- These tree spilt the data into multiple regions
code-
- Load diabetes and iris dataset
- check the pairplot
- split the data
- fit the model
- check the metrics
Basically, DT follow the tree like a structure that contain root, branch and leaf nodes of data