🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Feature Engineering: all 10 questions

Quiz: Feature Engineering · Question 2 of 10

What does this print? (code)

What does this print?

import numpy as np
x = np.array([10, 20, 30])
print(((x - x.min()) / (x.max() - x.min())).tolist())
  1. A.[10, 20, 30]
  2. B.[-1.0, 0.0, 1.0]
  3. C.[0.0, 0.5, 1.0]
  4. D.[0.33, 0.67, 1.0]
Answer & explanation

Correct answer: [0.0, 0.5, 1.0]

Min-max scaling maps the minimum to 0 and the maximum to 1.

Can you get the rest right without peeking?

Take the timed Quiz: Feature Engineering quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →