-
Notifications
You must be signed in to change notification settings - Fork 1
Decision Tree
A decision tree is a predictive modelling algorithm that uses a tree-like structure to make decisions or predictions. It partitions the data based on different features and creates a tree of decisions to classify or predict the outcome. It's like asking a series of yes or no questions to reach a final decision. It's an interpretable and widely used algorithm for both classification and regression tasks.
A decision tree consists of three main parts:
- Root node: initial question
- Internal nodes: intermediate features/questions
- Leaf nodes: final outcomes/predictions
The root node starts the decision-making process, internal nodes guide the flow based on features, and leaf nodes provide the final predictions.
- Start with a question or feature that divides the data into two or more subsets.
- Choose the best question or feature that provides the most useful information for making predictions.
- Divide the data based on the selected question or feature, creating branches or paths in the tree.
- Repeat the process for each subset, considering different questions or features at each step.
- Keep splitting the data until reaching a point where further divisions do not provide significant improvement.
- Assign the final outcomes or predictions to the leaf nodes of the tree.
- To make a prediction, follow the path from the root to a leaf node based on the answers to the questions.
The iris dataset (UCI) was used with the columns as,
- sepal length
- sepal width
- petal length
- petal width
- class (y – dependent variable)
The dataset can be used to classify what the iris plant species is (Iris Setosa, Iris Versicolour, Iris Virginica) or it can also be used for regression problems to predict the values of any of the other features as they are continuous values.
-
To learn more about Artificial Intelligence concepts, see Artificial Intelligence, Machine Learning, and Deep Learning..
-
Learn ML with Google Machine Learning Crash Course.
- Home
-
Machine Learning
- Supervised Learning
- Unsupervised Learning
- Deep Learning
- Recommender Systems