Ex 6.4 Classification Using Scikit-learn:

Objective: We will revisit the World Happiness Report (WHR) data for this exercise. Learn to build a classifier that we will train on a subset of the WHR numerical data (x) and the region data (y), so that we can predict regions from data for countries that we have not trained our model on.

  1. Download the Ex6.4_Scikit_Learn_Classification.ipynb and WHR dataset files.
  2. Work through each of the steps in the Jupyter Notebook which should include both your code and the corresponding output that match the screengrabs of the completed steps 6, 7, 8, and 9 provided below.

Expected output: Jupyter Notebook step 6 showing StandardScaler applied to WHR numerical features

 

Expected output: Jupyter Notebook step 7 showing train_test_split applied to scaled WHR data and region labels

 

Expected output: Jupyter Notebook step 8 showing SVM and decision tree classifiers trained and accuracy scores printed

 

Expected output: Jupyter Notebook step 9 showing classifier accuracy comparison between SVM and decision tree on WHR data