# W4 Lec5: Siamese Network with Binary Classification

Here Andrew said that, if 2 persons are different then y_hat will be 0

But from the equation it seems that, if 2 persons are different then the corresponding f(x) for them will be very different, in which case the value within the red box will be large. So y_hat will be close to 1 and not 0.
Am I correct?

I was not able to find that slide in the video.
Please give the time mark where you found this slide.

Week 4
Video 5 : " Face verification and Binary Classification"
This explanation spans from around 00:35 to 2:20
The red boxes and red text I have edited to convey my doubts

Hi @Thala,

Andrew roughly wrote this equation to give an understanding of how this would work. He also mentioned, w_k and b will be trained in order to give better predicted values. So you can think of it as, weights and bias are trained as such to handle big differences.

Best,
Mubsi

So the equation is not the correct one?

Hi @Thala,

It is not about whether the equation is right or not. The point is, that you have to find the distance/difference between the 2 encodings. Andrew wrote two versions of it as an example.

It really depends on what you want to use. There are a few formulas out there.

But the other important part to remember is that, despite the distance formula, you still have to train your “weights” and “bias”, which in the end are the most important decision makers in determining the output.

As you mentioned, if the output of the equation you marked in red seems that it will be a large value for different people, but maybe the weight is close to 0, then eventually, you’ll get a 0, right ?

Hope I made sense,
Mubsi