Week 3, Linear Transformation, Neural networks and matrices

The instructor said, “To include the bias into the matrix multiplication is to add an entire column with number one in the data table and a row with the bias, which is -1.5 in the model”.

Could you tell me the reason why he picked 1 to add to the entire table in the bias column?

The bias values of 1 will be multiplied by the bias weight.

It allows this computation:
f = x*w + b
To be implemented as:
f = x * w + 1 * b
… by using a single dot-product operation, when you include ‘b’ as an additional element in the ‘w’ vector.

1 Like

Reasoning step 1)
What you want is to check if ‘Lottery×1 + Win×1 -1.5’ is greater than 0.

Reasoning step 2)
‘Lottery×1 + Win×1 -1.5’ can be viewed as ‘Lottery×1 + Win×1 +1×-1.5’

Reasoning step 3)
You can think of the table on the left as a 9x3 matrix which we call A. Similarly, you can also think of the table on the right as a 3x1 matrix which we call B.

Reasoning step 4)
The matrix multiplication C=A×B is a 9x1 matrix, each row of which corresponds to ‘Lottery×1 + Win×1 +1×-1.5’ for each mail.

:smiling_face_with_three_hearts: Keep it up!!