Decision Tree is one the most useful machine learning algorithm. Decision tree can be used to solve both classification and regression problem.
When we use data points to create a decision tree, every internal node of the tree represents an attribute and every leaf node represents a class label.
Like any other machine learning algorithm, Decision Tree algorithm has both disadvantages and advantages.
Advantages of Decision Tree algorithm
- When using Decision tree algorithm it is not necessary to normalize the data.
- Decision tree algorithm implementation can be done without scaling the data as well.
- When using Decision tree algorithm it is not necessary to impute the missing values.
- The data pre-processing step for decision trees requires less code and analysis.
- The data pre-processing step for decision trees requires less time.
- The concept behind decision tree is more familer to programmers and comparatively easier to understand than other similar algorithms.
Disadvantages of Decision Tree algorithm
- The mathematical calculation of decision tree mostly require more memory.
- The mathematical calculation of decision tree mostly require more time.
- The reproducibility of decision tree model is highly sensitive as small change in the data can result in large change in the tree structure.
- The space and time complexity of decision tree model is relatively higher.
- Decision tree model training time is relatively more as complexity is high.
- Single Decision tree is often a weak learner so we require a bunch of decision tree for called random forest for better prediction.
Hence before implementing Decision Tree we need to brainstorm , whether it is suitable for our problem statement or not.
Happy Coding !!
If you like to check out Logistic Regression in Python from Scratch please watch video: