22.02.2024 Views

Daniel Voigt Godoy - Deep Learning with PyTorch Step-by-Step A Beginner’s Guide-leanpub

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure B.3 - Annotated model diagram

Decision Boundary, Activation Style!

And then I have a question for you:

"What does the decision boundary drawn by a logistic regression look

like?"

It is a straight line! We’ve seen this in Chapter 3 already. Before proceeding, let’s

make a quick summary to organize our findings so far:

• In the original feature space (x 0 and x 1 ), depicted in Figure B.1, it is impossible to

draw a straight line that separates the red and blue parabolas.

• In the transformed feature space (z 0 and z 1 ), it is still impossible to draw a

straight line that separates both parabolas, since the affine transformation

preserves parallel lines.

• In the activated feature space, (f(z 0 ) and f(z 1 )), where f is an activation function of

our choice, it becomes possible to draw a straight line that separates the red

and blue parabolas.

Even better, let’s look at the result of a trained model (using a sigmoid as activation

function f).

Decision Boundary, Activation Style! | 335

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!