Session Ready
Exercise

Normalizing features

After exploring your dataset and confirming the need for feature normalization, let us apply both min-max scaling and standardization to the shot power (SP) and release amount (RA) features in the fifa_sample dataset.

The min(), max(), mean() and sd() R functions will help you normalize the data. For your convenience, here are the formulas:

Min-max scaling

$$x' = \frac{x-min(x)}{max(x)-min(x)}$$

Standardization (Z-score normalization)

$$x' = \frac{x-\mu}{\sigma}$$

Although the scatterplot in the previous exercise did not visually reveal any extreme outlier in either feature, it is still a good idea to look at the distributions of the normalized values produced by the min-max and standardization methods. You can easily do that with the boxplot() function.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Normalize the two features in fifa_sample by applying both min-max scaling and Z-score normalization. Store the results in the fifa_normalized tibble.