Question: Python help using numpy(in the code numpy is np) - Let's consider the problem of data normalizationsscoling in statistics and machine leaming it is olten

Python help using numpy(in the code numpy is np)
Python help using numpy(in the code numpy is np) - Let's consider

- Let's consider the problem of data normalizationsscoling in statistics and machine leaming it is olten desirable to convert data to a specified range; for example scale the data sa that the values falls between 0 and 1 , which is called min-max rescaling Suppose you hwve a vector (or one dimensional array) of values x, then the min-max rescaled values are given by: x=max(x)min(x)xmin(x) for your evercise, first perform min-max rescaling over a one-dimensional array. Next, assume you are given a two dimensional array, where you need to pertorm min-max rescaling on each column separately. Test that your code works as expected! menene,randon, default_ong() a ane dimensional anroy; x= mes.standard nornal (sizen(59), - code for min-mox rescoling of an arrey (onte the of code) Xerng.standard_norsal(size: (50,20)) - code for ein-max reicating of a 2.9 orray A can be done in one tine of code P anke sure you don't use for coopsit To evaluate your code for min-mak rescaling compute the following (assuming that your rescaled mattix is stored in a variabio named X roscaled): print(Xrescaled.min(axisee)) print(X_rescaled.nax(axis=0))

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!