Question about w.T * X + b

I interested, what does specific amount of returned values from w.T * X + b mean. I tried to ask chat GPT about that and it answered this amount equals to amount of labels. But I am not sure if this true considering that in task of cat recongition there only two labels: “cat” and “non-cat”, but this equation returns 3 items.

Could somebody explain what does this amount means ?

We have Z = W^T.X + b, right? Then we applied a sigmoid, A = g(Z), which gives a value from 0 to 1. Then we set a threshold like if A \geq 0.5, it’s a cat.

Where do you see 3 returned items?

In “propagate” function I just printed A.shape and got (1, 3)

Don’t forget that A is a vectorized form.

Please gives us the full background of which assignment, course, and week are you talking about. You posted this in a General Discussions, move it to the right category.

Well, I moved it to correct topic. I am talking about week 2. I finished all tasks, but currently I want to implement own code using the example.

Let me provide you some context. I want to implement model by example from the task, but in my case I want to teach the model to predict factorial value. I passed 10x1 array of inputs and 10x1 array of outputs.

And got w.T * X + b equals to 1x1 matrix. So I was interested why, because my next equations not work correctly.

Do not rely on chatbots.

“*” represents element-wise multiplication. So, I think you meant to say the dot product between them (w^T \cdot X + b), correct?

In your case, where w is a vector and X is a matrix, this will output a vector of numbers that is equal in length to the number of examples in your matrix X.

1 Like

Number of examples I pass per iteration, right ?

@Anachoreta , I edited my previous response to provide a slight justification.

1 Like