Problem Description:

This lab question is from optional textbook with minor modification.

The predictive task in this question is to predict the level of corruption in a country based on a range of macro-economic and social features. The table below lists some countries described by the following descriptive features:

The target feature is the Corruption Perception Index (CPI). The CPI measures the perceived levels of corruption in the public sector of countries and ranges from 0 (highly corrupt) to 10 (very clean).

The data listed in this table is real and is form 2010/11 (or the most recent year prior to 2010/11 when the data was available).

The data for the descriptive features in this table was amalgamated from a number of surveys retrieved from Gapminder (www.gapminder.org). The Corruption Perception Index is generated annually by Transparency International (www.transparency.org).)
COUNTRYLIFE EXP. TOP-10 INCOMEINFANT MORT. MIL. SPENDSCHOOL YEARSCPI
Afghanistan59.6123.2174.304.440.401.5171
Haiti45.0047.6773.100.903.401.7999
Nigeria51.3038.2382.601.974.102.4493
Egypt70.4826.5819.601.865.302.8622
Argentina75.7732.3013.300.7610.102.9961
China74.8729.9813.701.956.403.6356
Brazil73.1242.9314.501.437.203.7741
Israel81.3028.803.606.7712.505.8069
U.S.A.78.5129.856.304.7213.707.1357
Ireland80.1527.233.500.6011.507.5360
U.K.80.0928.494.402.5913.007.7751
Germany80.2422.073.501.3112.008.0461
Canada80.9924.794.901.4214.208.6725
Australia82.0925.404.201.8611.508.8442
Sweden81.4322.182.401.2712.809.2985
New Zealand80.6727.814.901.1312.309.4627

We will use Russia as our query country for this question. The table below lists the descriptive features for Russia.
COUNTRYLIFE EXP. TOP-10 INCOMEINFANT MORT. MIL. SPENDSCHOOL YEARSCPI
Russia67.6231.6810.003.8712.90?

Your tasks:

  1. Calculate the distance between Russia and each of the countries listed in the first table using Euclidean distance.
  2. What value would a 3-nearest neighbor prediction model using Euclidean distance return for the CPI of Russia?
  3. What value would a weighted k-NN prediction model return for the CPI of Russia? Use k = 3 and k = 16 (i.e., the full dataset) respectively and a weighting scheme of the reciprocal of the squared Euclidean distance between the neighbor and the query.
  4. The descriptive features in this dataset are of different types. For example, some are percentages, others are measured in years, and others are measured in counts per 1,000. We should always consider normalizing our data, but it is particularly important to do this when the descriptive features are measured in different units. Generate a new table of data for the countries (including Russia), where each descriptive attribute is normalized using range normalization.
  5. What value would a 3-nearest neighbor predicion model using Euclidean distance return for the CPI of Russia when the descriptive features have been normalized using range normalization?
  6. What value would a weighted k-NN prediction model return for the CPI of Russia when it is applied to the range-normalized data? Use k = 3 and k = 16 (i.e., the full dataset) respectively and a weighting scheme of the reciprocal of the squared Euclidean distance between the neighbor and the query.
  7. The actual 2011 CPI for Russia was 2.4488. Which of the predictions made was the most accurate? Why do you think this was?