Question: Inspect the dataset titled lab 0 1 _ dataset _ 2 . csv which also has a mixture of numerical and categorical data. For this

Inspect the dataset titled lab01_dataset_2.csv which also has a mixture of numerical and categorical data. For this problem, you will use decision tree classifiers for supervised learning. In particular, you will be using the functionalities of the sklearn.tree library. The classification task using sklearn libraries work only on numerical-valued attributes, and not on categorical ones. (What to do now? Hint: Look up One-hot Encoding and Integer Encoding). Here are all the required tasks
1. Restructure the dataset such that it has all numerical-valued attributes. (2 marks)
2. Perform supervised learning using decision tree classifiers. Employ the train-test
split approach during the learning. (4 marks)
3. After the learning is complete, show the results by predicting the class of the test
set. Display the results of the prediction and test set side-by-side. (2 marks)
4. Output the decision tree; it can be either a textual representation or a graphical
representation. (2 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!