Exercises
- In your own words, answer the following two questions. Use 200 words (at most) to answer each question:
a) What is the difference between classification and prediction?
b) What is the difference between classification and clustering?
- Consider Figure 8.6 regarding the necessity of normalization before performing clustering analysis. With your new appreciation for this process, would you like to change your answer to the first exercise question from the previous chapter?
- In this chapter, we used
WH Report_preprocessed.csv
to form meaningful clusters of countries using 2019 data. In this exercise, we want to use the data from 2010-2019. Perform the following steps to do this:a) Use the
.pivot()
function to restructure the data so that each combination of the year and happiness index has a column. In other words, the data of the year is recorded in long format, and we would like to change that into wide format. Name the resulting datapvt_df
. We will not need thePopulation...