6

Top 10 Must Read Interview Questions on Decision Trees

 1 year ago
source link: https://www.analyticsvidhya.com/blog/2023/02/top-10-must-read-interview-questions-on-decision-trees/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Introduction

Decision trees are one of the most widely used algorithms in machine learning which provide accurate and reliable results that can be used for classification and regression problems. In data science interviews, questions are mostly asked related to decision trees. It is essential to answer those questions efficiently as it is one of the most useful, necessary, and basic algorithms.

This article will discuss the top questions related in machine learning interviews and their appropriate solutions. This will help one to answer those questions efficiently and appropriately.

Learning Objectives

After going through this article, you will learn:

  1. The terminologies CART and ID3 algorithms.
  2. Understanding of entropy and information gain.
  3. The properties of decision trees.
  4. Overfitting and underfitting.
  5.  A proper way to answer interview questions related to the decision tree.
  6. To design and deliver an appropriate answer to interview questions efficiently.

This article was published as a part of the Data Science Blogathon.

Table of Content

  1. What are CART algorithms in machine learning?
  2. What are ID3 algorithms in decision trees?
  3. What is entropy in decision trees?
  4. What is Information gained in decision trees?
  5. What is gini entropy in decision trees?
  6. What are root and leaf nodes in decision trees?
  7. What are shallow and deep decision trees?
  8. How do underfitting and overfitting occur?
  9. Why are decision trees unstable?
  10. Why is feature scaling not required in decision trees?
  11. Conclusion

Q1. What are CART Algorithms in Machine Learning?

CART stands for Classification and Regression Trees, an algorithm that splits the data from the top to the bottom level based on information gain and entropy. This algorithm calculates the impurity for each possible split and then decides according to the minimum loss.

Q2. What are ID3 Algorithms in Decision Trees?

ID3 algorithms are a type of algorithm that works on the principle of impurity, and information gain of the split, the algorithm calculates the entropy and information gain for all splits and divides the data accordingly.

DECISION TREES
DECISION TREES
DECISION TREES

Here note that the CART algorithm is used for binary trees, for example, yes or no. At the same time, the ID3 algorithm is used for multiple class nodes where the tree has more than two leaf nodes.

Q3. What is Entropy in Decision Trees?

Entropy is a measure of uncertainty or impurity that a particular split or node has. Here the data is divided into many divisions, where it can have some impurity. If the data is wholly split homogeneously, the entropy will be zero.

Entropy = -yi(log(yi))

Q4. What is Information Gain?

Login Required

Q5. What is Gini Entropy?

Login Required

Q6. What are Root and Leaf Nodes in Decision Trees?

Login Required

Q7. What are Shallow and Deep Decision Trees?

Login Required

Q8. How do Overfitting and Underfitting Occur?

Login Required

Q9. Why are Decision Trees Unstable Algorithms?

Login Required

Q10. Why is Feature Scaling not Required in Decision Trees?

Login Required

Conclusion

In this article, we discussed the top interview question that can be asked in data science questions with their appropriate answers. This article will help one to answer these questions efficiently in the interviews and learn a better approach to designing and delivering an accurate and precise response.

Some of the Key Takeaways from this article are:

  1. Decision trees are tree-based models which splits the data and result output.

  2. CART algorithms,s are binary node algorithms, whereas ID3 are multiple node algorithms that can be used for nodes having more than two splits.

  3. Very shallow trees result in underfitting, and intense trees result in overfitting.

  4. Decision trees are unstable algorithm that trains when a new observation is added.

  5. Features scaling is not required for decision trees as it does not affect the information gain and entropy of the split.

 The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.

Related


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK