Hi team, I have followed the hints provided for this function, also tried to do the matrix multiplication by transposing. Still face errors in the numbers.
Can someone please suggest something?
Hi team, I have followed the hints provided for this function, also tried to do the matrix multiplication by transposing. Still face errors in the numbers.
Can someone please suggest something?
The plotted graph for words also looks reasonable.
Hey @Harshita_Agarwala,
Welcome, and we are glad that you could become a part of our community
You have posted the discussion in the wrong category (Week 2). I have moved it to the correct category (Week 3) by using the little pencil icon next to the title.
Also, please check your DM.
Cheers,
Elemento
Hey @Harshita_Agarwala,
The issue lies in the last step of your implementation of compute_pca
. Please take a look at the comment carefully:
Transform the data by multiplying the transpose of the eigenvectors with the transpose of the de-meaned data. Then take the transpose of that product.
You are supposed to use the de-meaned data, i.e., X_demeaned
, however, you have used X
here. Additionally, please do take care of the transpose operations. You can print the shapes of the variables involved, and figure out where you should apply the transpose, and where not. I hope this helps.
Cheers,
Elemento
Thanks @Elemento! It works now