wtp_train_xwtp_test_xwtp_train_ywtp_test_y train_test_split(wtp_featureswtp_class_labelstest_size= random_state= print(counter(wtp_train_y)counter(wtp_test_y)print('features:'list(wtp_feature_names)counter({'white' 'red' }counter({'white' 'red' }features['fixed acidity''volatile acidity''citric acid''residual sugar''chlorides''free sulfur dioxide''total sulfur dioxide''density''ph''sulphates''alcohol'the numbers show us the wine samples for each class and we can also see the feature names which will be used in our feature set let' move on to scaling our features we will be using standard scaler in this scenario in [ ]define the scaler wtp_ss standardscaler(fit(wtp_train_xscale the train set wtp_train_sx wtp_ss transform(wtp_train_xscale the test set wtp_test_sx wtp_ss transform(wtp_test_xsince we are dealing with binary classification problemone of the traditional machine learning algorithms we can use is the logistic regression model if you remember we had talked about this in detail in feel free to skim through the "traditional supervised machine learning modelssection in to refresh your memory on logistic regression or you can refer to any standard text book or material on classification models let' now train model on our training dataset and labels using logistic regression in [ ]from sklearn linear_model import logisticregression wtp_lr logisticregression(wtp_lr fit(wtp_train_sxwtp_train_yout[ ]logisticregression( = class_weight=nonedual=falsefit_intercept=trueintercept_scaling= max_iter= multi_class='ovr'n_jobs= penalty=' 'random_state=nonesolver='liblinear'tol= verbose= warm_start=falsenow that our model is readylet' predict the wine types for our test data samples and evaluate the performance in [ ]wtp_lr_predictions wtp_lr predict(wtp_test_sxmeu display_model_performance_metrics(true_labels=wtp_test_ypredicted_labels=wtp_lr_predictionsclasses=['red''white']figure - model performance metrics for logistic regression for wine type predictive model