Decision Tree (25 points) Description: In this weeks assignment you will be expl

May 6, 2024

Decision Tree (25 points)
Description:
In this weeks assignment you will be exploring Decision Tree algorithm from Scikit learn on your own using a different dataset. You will be doing the following tasks
Download the Jupyter notebook which was shared with you in Canvas and I went over in the lecture
Read the description for Wine dataset which is included in the Scikit-learn library (Similar to Iris)
https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_wine.html#sklearn.datasets.load_wineLinks to an external site.
If you check this page towards the end you will see sample code about how to load the wine dataset in the same fashion as Iris was loaded
3. Read the description for Decision Tree on scikit-learn’s website
https://scikit-learn.org/stable/modules/tree.htmlLinks to an external site.
and how the tree can be exported using GraphViz https://graphviz.readthedocs.io/en/stable/manual.htmlLinks to an external site.
4. Modify the Jupyter Notebook which was shared with you to achieve the following goals
Load the wine dataset in place of Iris dataset (5 points)
Use the code to do classification on the wine dataset similar to Iris (5 points)
Identify the accuracy numbers.
Check the documentation for Decision Tree on https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifierLinks to an external site. and notice the parameter min_samples_split
Tweak the value of min_samples_split with three different values. You can decide the values, but for each alteration to min_samples_split you have to print the accuracy numbers.  (10 points)
Export the decision tree image for the value of min_samples_split which gives the highest accuracy using graphviz library as described in previous bullet point (3) as a PDF file “wine.pdf”   (5 points) 
What to submit:
Create a zip file containing 
Your Jupyternotebook with the code changes. 
PDF file with your decision tree. 

Are you struggling with this assignment?

Our team of qualified writers will write an original paper for you. Good grades guaranteed! Complete paper delivered to straight to your email.

GET HELP WITH YOUR PAPER