What does X stand here for?

In the lecture # Vectorizing Logistic Regression’s Gradient Output
I got a little confused about the meaning of x here. There are x(i) and x1(i) and x2(i). If x1(i) and x2(i) stand for the attributes of example i, shouldn’t the z function look like this: z(i) = w1Tx1(i) + w2Tx2(i) + b, instead of z(i) = wTx(i) + b?

Hope you can understand my question. Thanks.

Hello @cppiod,


Almost, but there will be no “T” because the “T” is only needed when we work with w and x^{(i)}, so it would be z(i) = w1x1(i) + w2x2(i) + b.

Make sense?

Why “instead”? They are two ways of representing the same thing. You can use either of them .


Thank you for your reply.
Does the x(i) mean the array set of x1(i) and x2(i)?

Yes, I think your description is good!

Got it. Thank you so much.