Confused about C1_W4_Assignment Exercise 3

Looking at the code for exercise 3, i see a 5x5 matrix. Matrix P in the text is a 4x4.

I suspect that P goes in the upper left corner of the array in the code, but i have no idea what the last row is?

Is this for a bias or y values?

Any pointers will be appreciated.

Thanks

Hi @rtayek!

Firstly, welcome to our community!

The question asks to define a square matrix P with size n =5. The following matrix is just an example for n = 4. Even though it looks like the matrices P in the text and in the code look the same, they are not.

Thanks,
Lucas

I defined P with zeroes on the diagonal and rows that sum to 1.
My unit tests says:

Wrong vector X1. Check if matrix multiplication was performed correctly.
6 Tests passed
1 Tests failed

This happens if i use the mp method or the at sign.

Are we supposed to get the values from somewhere?

My vision is real poor, so i may be missing something obvious.

Thanks

1 Like

You’re not missing anything, you are actually correct! There is a bug in the unit test function, this is alredy being fixed by our Curriculum Engineer.

This will not affect your final grade, though.

Thanks,
Lucas

1 Like

Great!l :grinning: :grinning:

Thank you.

you should add that to a temporary note inside the assignment.

If we provide X0 = np.array([[0],[0],[0],[1],[0]]), then it works.

Why are there so many bugs in graded labs that are pretty basic in nature? This is paid course for godsake that is $50 a month! Does your staff have no quality control? Students are hardpressed to find time to spend on low quality of labs. A student should not be expected to uncover bugs in a lab, report back to you so you can fix it while they are waiting for their grade to reflect what they actually know. This is pretty disappointing.

What this means is that the Curriculum Engineer is not even checking the content that he is publishing as a graded lab. This should be basic QA 101 in any kind of a software release process.

I don’t mean to be misunderstood. I am aware that your staff is trying their best to help out the students, and it is universally appreciated, but the people putting out the labs should know better.

2 Likes