Question: 2. [Marks: 40%] Using the UCI wine dataset (https://archive.ics.uci.edu/ml/datasets/Wine), generate a binary decision tree of maximum depth = 4. No need to split into

2. [Marks: 40%] Using the UCI wine dataset (https://archive.ics.uci.edu/ml/datasets/Wine), generate a binary

2. [Marks: 40%] Using the UCI wine dataset (https://archive.ics.uci.edu/ml/datasets/Wine), generate a binary decision tree of maximum depth = 4. No need to split into training/testing. Submit: [1] your code in a file named wine.py, and [2] the tree in a file named wine.jpeg. You may want to install GraphViz to generate the jpeg image of the tree.

Step by Step Solution

3.35 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 import pandas as pd import numpy as np from sklearntree import DecisionTreeClassifier from sklearntree import exportgraphviz from IPythondisplay imp... View full answer

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 Programming Questions!