Question: **Write simple code from scratch to standardize data (feature scaling) in Python** **library sklearn cannot be used for this problem** Given a an ndarray: X

**Write simple code from scratch to standardize data (feature scaling) in Python**
**library sklearn cannot be used for this problem**
Given a an ndarray:
X = np.array([[50, 30], [20, 90], [30, 50]])
1. Calculate the means for each column. The output should be an array with the shape of (2, 1).
2. Calculate the standard deviation for each column. The output should be an array with the shape of (2, 1).
3. For each value, subtract it from the corresponding mean and divide by the corresponding standard deviation. The output should return the 3x3 matrix as shown in the image.
**Write simple code from scratch to standardize data (feature scaling) in Python**

Givena X X2 50 20 30 30 90 50 column means = [ 33.33 56.66 2. column standard deviation - (15.27 30.55 ] X 50-33.33 15.27 30-56.66 30.55 1.09 -0.87 -0.87 1.09 L-0.21 0.21 20-333 15.27 90-56.66 30.55 30 - 33.33 15.29 50 - 56.66 30.55

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!