Decision Tree (Part 3): Machine Learning Interview Prep 07
A Decision Tree is a type of algorithm used in machine learning to help computers make decisions based on input data. It works by breaking down a problem into smaller, more manageable parts through a series of questions. These questions lead to a tree-like structure where each branch represents a possible outcome. By following this structure, the algorithm can determine the best course of action or predict future events based on the given data. Decision Trees are widely used in various fields, from finance to healthcare, due to their simplicity and effectiveness in decision-making processes.
Let’s check your basic knowledge of the Decision Tree. Here are 10 multiple-choice questions for you and there’s no time limit. Have fun!
Question 1: In a decision tree, which one is true for the root node?
(A) The root node represents the entire population or sample
(B) The Node that does not split is called the root node
(C) Root and leaf node are the same
(D) All of the above
Question 2: What is a Decision Node in a decision tree?
(A) The end of the decision tree where it cannot be split into further sub-nodes.
(B) When a sub-node splits into further sub-nodes, then it is called the decision node
(C) The entire population or sample
(D) All of the above
Question 3: What is a Branch in a decision tree?
(A) A subsection of the entire tree
(B) When a sub-node splits into further sub-nodes, then it is called the decision node
(C) The entire population or sample
(D) All of the above
Question 4: In the decision tree algorithm, a node that is divided into sub-nodes is called a _____ node of sub-nodes whereas sub-nodes are the _____ of a parent node.
(A) child, parent
(B) root, leaf
(C) leaf, root
(D) parent, child
Question 5: For a decision tree, which options are true? (Select two)
(A) The root node represents the entire population or sample
(B) When a sub-node splits into further sub-nodes, then it is called the decision node
(C) When a sub-node splits into further sub-nodes, then it is called the root node
(D) leaf node and terminal node are different
Question 6: For a decision tree, which options are true? (Select two)
(A) Nodes that do not split is called Leaf or Terminal node
(B) Nodes that do not split is called the root node
(C) A node, which is divided into sub-nodes is called a parent node of sub-nodes whereas sub-nodes are the child of a parent node
(D) A node that is divided into sub-nodes is called a child node of sub-nodes whereas sub-nodes are the leaf of a parent node.
Question 7: For a decision tree, which options are true? (Select two)
(A) Splitting and pruning are the same
(B) When we remove sub-nodes of a decision node, this process is called splitting
(C) Splitting is a process of dividing a node into two or more sub-nodes
(D) When we remove sub-nodes of a decision node, this process is called pruning
Question 8: A decision tree classifier selects the attribute that has the _____ Entropy or Largest Information gain.
(A) smallest
(B) largest
(C) mean
(D) median
Question 9: A decision tree algorithm is ______.
(A) stacked queues and deques
(B) searching and sorting
(C) linked lists
(D) recursive
Question 10: A decision tree classifier selects the attribute that has the smallest Entropy or _____ Information gain.
(A) smallest
(B) largest
(C) mean
(D) median
The solutions will be published in the next quiz Linear Regression (Part 2): Machine Learning Interview Prep 08.
Happy learning. If you like the questions and enjoy taking the test, please subscribe to my email list for the latest ML questions, follow my Medium profile, and leave a clap for me. Feel free to discuss your thoughts on these questions in the comment section. Don’t forget to share the quiz link with your friends or LinkedIn connections. If you want to connect with me on LinkedIn: my LinkedIn profile.
The solution of Decision Tree (Part 2): Machine Learning Interview Prep 06 - 1(A), 2(A), 3(A), 4(D), 5(C), 6(B), 7(B), 8(C), 9(D), 10(A)
References:
[1] What Is a Decision Tree?: https://www.mastersindatascience.org/learning/introduction-to-machine-learning-algorithms/decision-tree/
[2] Decision Tree Algorithm, Explained: https://www.kdnuggets.com/2020/01/decision-tree-algorithm-explained.html
[3] Decision Trees in Machine Learning: https://towardsdatascience.com/decision-trees-in-machine-learning-641b9c4e8052