C1_W4 Linear Algebra

When creating a post, please add:

I am following same steps to do but I guess I am making mistake on some point or not considering can you please help out

{moderator edit - solution code removed}

Hello @Ayush_Hakhu

Use of for loop is not required

the first code line for this grader cell should
mean_vector = None where # use np.mean to get the vector of means, remember to pass the correct axis argument
then
mean_matrix = None # use np.repeat to repeat the mean vector n_observations times

Then calculate mean matrix by use np.reshape to reshape into a matrix with the same size as Y. Remember to use order=‘F’
mean_matrix =None

Then subtract mean_matrix from centre data. The operations are performed elementwise

incorrect code, you are suppose to use np.dot and not np.transpose

that should be x.shape

Regards
DP

Thanks! for helping it worked

1 Like