figure - visualizing the model decision surface for our logistic regression model the plot depicted in figure - reinforces the fact that our model has learned the underlying patterns quite well based on just the two most important featureswhich it has used to separate out majority of the red wine samples from the white wine samples depicted by the scatter dots there are very few misclassifications here and therewhich are evident based on the statistics we obtained earlier in the confusion matrices predicting wine quality in our wine quality datasetwe have several quality rating classes ranging from to what we will be focusing on is the quality_label variable that classifies wine into lowmediumand high ratings based on the underlying quality variable based on the mapping we created in the "exploratory data analysissection this is done because several rating scores have very few wine samples and hence similar quality ratings were clubbed together into one quality class rating we use the prefix wqp_ for all variables and models involved in prediction of wine quality to distinguish it from other analysis the prefix wqp stands for wine quality prediction we will evaluate and look at tree based classification models as well as ensemble models in this section the following code helps us prepare our train and test datasets for modeling in [ ]wqp_features wines iloc[:,:- wqp_class_labels np array(wines['quality_label']wqp_label_names ['low''medium''high'wqp_feature_names list(wqp_features columnswqp_train_xwqp_test_xwqp_train_ywqp_test_y train_test_split(wqp_featureswqp_class_labelstest_size= random_state= print(counter(wqp_train_y)counter(wqp_test_y)print('features:'wqp_feature_names