Can you share your lab ID with me ? In the assignment, when you click the top right “Help” button, a panel will open and your lab ID will be shown at the bottom.
I shall take a look.
When you reply back, kindly tag me in the post so that I’m notified.
@cserranobr Check if you sorting eigen_vecs also in the decresing index like eigen_vals and set to eigen_vecs_sorted? I don’t see any other you got those wrong numbers.
Hello,
I’m facing the same problem as @cserranobr. The shape seems to be correct but the values seem to be wrong. However, when I continue the plot seems to be ok. Is there a problem with my calculation of X_demeaned:
I’m facing the same issue, and I’ve followed all solutions in this post. I’m at the same stage here, passed 4 tests but failed 2. Were you able to resolve the issue? Do you mind sharing if you did?
Okay, I am stuck here as well; 4 passed, 2 failed.
The correct shape but wrong expected values.
I played around with the sort order of the vecs and that didn’t work.
I put the original vals in Excel and sorted them.
They were in order, so when I reversed the order, it went from 9 to 0.
Is this a clue, were the vals already in ascending order?
So when I sort the vecs, it is just putting them in reverse order.
All the shapes are correct, so could it be that my covariance matrix is not working?
I don’t see any suggestions other than sorting the vecs correctly.
I followed the hints eigen_vecs[:,idx_sorted_decreasing]
I found my mistake. The directions said use np.mean(a, axis=None) and copied that exactly.
I failed to continue reading where it said to set axis to = 0.
FAIL!
I am having similar problems getting X_reduced. I have read the related threads. My X_demeaned.T and eigen_vecs_reduced.T can’t be multipled: the shapes aren’t compatible. My lab id is isitxkmp
Hi! I have the same error, could I please ask for help? For demeaning I used the axis = 1 means only (no stdev, as had been suggested in the slides); for eigh, I used rowvar = False; all the dimensions are logical and match throughout, but the final numbers do not match. Here is my lab_id, with kind thanks: pvmqenzc
I’m also stuck at the 4 tests passing 2 tests failing stage, after following everyone’s advice. Obviously the plots don’t look like they’re supposed to. I’m frustrated by this exercise - lots of transformatory steps are given without any explanation or clues. If we’re not going to go in depth on the PCA algorithm, I’d much rather work with the library, like in the example lab in the lecture track. My assignment ID is sqvzibve if anyone would be kind enough to take a look. Grader passes it at 80%, I may come back to it later, but moving forward for now.