Section 5. Programming Question on Decision Trees (Questions…
Section 5. Programming Question on Decision Trees (Questions 17-22) Suppose you are asked to predict if a student will be accepted or rejected from the University of Data Science. For this task, you will be working with the Students dataset, containing a binary outcome ‘Accepted’ of 19 students. There are 5 predictors including ‘GPA’, ‘SAT Math Score’, ‘SAT Reading Score’, ‘Sex’, and ‘State’. You may assume that the following import statements have already been included: import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport graphvizimport seaborn as snsfrom IPython.display import Imageimport pydotplusfrom sklearn import tree The first thing we need to do is read in the dataset with the following code: students = pd.read_csv(‘Students.csv’) students.head() What output would you expect to see?