Week 3, Decision Boundary video

I don’t understand how f_[w]b(X) == g(z)?

From my understanding, function f_wb(X) = z. Then function g takes z (not equals to z). So how they become equal?

Can anyone explain this?

1 Like

Hello @BACHYY

Welcome to the community.

When we do Linear Regression, we define f_{w,b}(\vec x) = \vec w. \vec x +b

When we do Logistic Regression, we use a different definition f_{w,b}(\vec x) = {\large \frac {1} {1 + e^ {-(\vec w. \vec x +b)}}}
For mathematical simplicity, we write z = (\vec w. \vec x +b) and g(z) = \frac {1} {1+e^{-z}}
Hence, for logistic regression → f_{w,b}(\vec x) = \frac {1} {\large 1 + e^ {-(\vec w. \vec x +b)}} = \frac {1} {1+e^{-z}} = g(z)

We had a similar discussion here

1 Like

Ahh, This makes sense. Thank you .