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.

Are my data points separable?

That’s the million-dollar question! In the example above, we can clearly see

that data points in the validation set are more separable than those in the

training set.

What happens if the points are not separable at all? Let’s take a quick detour

and look at another tiny dataset with 10 data points, seven red, three blue.

The colors are the labels (y), and each data point has a single feature (x 1 ). We

could plot them along a line; after all, we have only one dimension.

Can you separate the blue points from the red ones with one straight line?

Obviously not—these points are not separable (in one dimension, that is).

Should we give up, then?

"Never give up, never surrender!"

Commander Taggart

If it doesn’t work in one dimension, try using two! There is just one problem,

though: Where does the other dimension come from? We can use a trick

here: We apply a function to the original dimension (feature) and use the

result as a second dimension (feature). Quite simple, right?

For the tiny dataset at hand, we could try the square function:

What does it look like?

Decision Boundary | 239

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

Saved successfully!

Ooh no, something went wrong!