Build a decision tree by taking as input a maximum depth and by randomly splitting the dataset as 80/20 split i.e., 80% for training and 20% for testing.

computer science

Description

Build a decision tree by taking as input a maximum depth and by randomly splitting the dataset as 80/20 split i.e., 80% for training and 20% for testing. Provide the accuracy by averaging over 10 random 80/20 splits. Consider that particular tree which provides the best test accuracy as the desired one. 30 marks 


2. What is the best possible depth limit to be used for your dataset? Provide a plot explaining the same. 20 marks 


3. Perform the pruning operation over the tree obtained in question 2 using a valid statistical test for comparison. 30 marks 


4. Print the final decision tree obtained from question 3 following the hierarchical levels of data attributes as nodes of the tree. 10 marks 5. A brief report explaining the procedure and the results


Related Questions in computer science category