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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2021/10/615c62eab2bef_1633444586947.jpg)
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 import pandas as pd import numpy as np from sklearntree import DecisionTreeClassifier from sklearntree import exportgraphviz from IPythondisplay imp... View full answer
Get step-by-step solutions from verified subject matter experts
