Create a classifier to predict the wine color from wine quality attributes using this dataset: http://archive.ics.uci.edu/ml/datasets/Wine+Quality

The data is in the database we've been using

  • host='training.c1erymiua9dx.us-east-1.rds.amazonaws.com'
  • database='training'
  • port=5432
  • user='dot_student'
  • password='qgis'
  • table name = 'winequality'

Query for the data and create a numpy array


In [ ]:

Split the data into features (x) and target (y, the last column in the table)

Remember you can cast the results into an numpy array and then slice out what you want


In [ ]:

Create a decision tree with the data


In [ ]:

Run 10-fold cross validation on the model


In [ ]:

If you have time, calculate the feature importance and graph based on the code in the slides from last class


In [ ]: