Member-only story
Car Classification Using Python & Machine Learning
Simple Decision Tree Python Program
In this article I will show you how to create your own Machine Learning program to classify a car as ‘unacceptable’, ‘accepted’, ‘good’, or ‘very good’, using a Machine Learning (ML) algorithm called a Decision Tree and the Python programming language !
Decision Trees are a type of Supervised Learning Algorithms(meaning that they were given labeled data to train on). The training data is continuously split into two more sub-nodes according to a certain parameter. The tree can be explained by two things, leaves and decision nodes. The decision nodes are where the data is split. The leaves are the decisions or the final outcomes. You can think of a decision tree in programming terms as a tree that has a bunch of “if statements” for each node until you get to a leaf node (the final outcome).
Decision Tree Pros:
- Simple to understand and to interpret
- List Requires little data preparation
Decision Tree Cons:
- Prone to over-fitting
- Decision trees can be unstable (a small variation in the data may result in a completely different tree being generated)