...

/

Data Transformation (Scaling and Normalization)

Data Transformation (Scaling and Normalization)

Explore interview prep questions on scaling and standardization.

Scaling and normalization are important for building stable, performant models. In this lesson, we’ll learn how to implement standard techniques like min-max scaling and z-score standardization and extend them to robust scaling that can handle real-world outliers. Let’s get started.

Min-max scaling and z-score standardization

You’re given a dataset containing numerical features. Implement two custom scaling methods for a given dataset without using scikit-learn’s preprocessing module. Create functions that:

  1. Perform min-max scaling to transform data to a [0, 1] range.

  2. Perform z-score standardization (zero mean, unit variance). ...