Question: Please Help and explain, Task 6 - To improve convergence rate, we can scale ( standardize ) the inputs Below is the scatter plot of

Please Help and explain,
Task 6- To improve convergence rate, we can scale (standardize) the inputs
Below is the scatter plot of x before scaling. Create X_scaled, for every column (except the first as it is already scaled) such that =-mean()std()
In []: $ Create a figure instance
fig = pit.figure , figsize =(9,6)
4 Create an axes instance
ax= fig.add_subplot(111)
Create the boxplot
bp=ax*boxp1ot(x)
p1t.xlabel("xe, x2, x2')
plt.title("Before feature scaling")
In [47]=
x?riean= np.mean , axis =0 wimean of columns
mu1=xnean[1]
mu2=x-nean [2]
x-var= np.var , axis =0
s1= np.sqrt (X_var[1])
s2= np.sqrt (X_var[2])
x_scaled =x% intialize
In [48]: & your code here to calculate X_scaled using mu1, wu2, s1, s2. Avoid using for loop and use vector operations
outputs: updated x-scaled
In []: $ Create a figure instance
fig = pit.figure , figsize =(9,6)
Create an axes instance
ax= fig.add_subplot(111)
A Create the boxplot
bp=ax.boxplot (X_scaled)
p1t.xlabel('xe,xbar(2),x2')
plt.title('After feature scaling')
Show that your output looks like this:Task 6- To improve convergence rate, we can scale (standardize) the inputs
Below is the scatter plot of x before scaling. Create X_scaled, for every column (except the first as it is already scaled) such that =-mean()std()
In []: $ Create a figure instance
fig = pit.figure , figsize =(9,6)
4 Create an axes instance
ax= fig.add_subplot(111)
Create the boxplot
bp=ax*boxp1ot(x)
p1t.xlabel("xe, x2, x2')
plt.title("Before feature scaling")
In [47]=
x?riean= np.mean , axis =0 wimean of columns
mu1=xnean[1]
mu2=x-nean [2]
x-var= np.var , axis =0
s1= np.sqrt (X_var[1])
s2= np.sqrt (X_var[2])
x_scaled =x% intialize
In [48]: & your code here to calculate X_scaled using mu1, wu2, s1, s2. Avoid using for loop and use vector operations
outputs: updated x-scaled
In []: $ Create a figure instance
fig = pit.figure , figsize =(9,6)
Create an axes instance
ax= fig.add_subplot(111)
A Create the boxplot
bp=ax.boxplot (X_scaled)
p1t.xlabel('xe,xbar(2),x2')
plt.title('After feature scaling')
Show that your output looks like this:
 Please Help and explain, Task 6- To improve convergence rate, we

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!