Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**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.
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago