← 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())
- A.[10, 20, 30]
- B.[-1.0, 0.0, 1.0]
- C.[0.0, 0.5, 1.0]
- 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 →