Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On One-shot Learning with Python

You're reading from  Hands-On One-shot Learning with Python

Product type Book
Published in Apr 2020
Publisher Packt
ISBN-13 9781838825461
Pages 156 pages
Edition 1st Edition
Languages
Authors (2):
Shruti Jadon Shruti Jadon
Profile icon Shruti Jadon
Ankush Garg Ankush Garg
Profile icon Ankush Garg
View More author details
Toc

Table of Contents (11) Chapters close

Coding exercise

In this section, we will explore a basic one-shot learning approach. As humans, we have a hierarchical way of thinking. For example, if we see something unknown to us, we look for its similarity to objects we already know. Similarly, in this exercise, we will use a nonparametric kNN approach to find classes. We will also compare its performance to the basic neural network architecture.

kNN – basic one-shot learning

In this exercise, we will compare kNN to neural networks where we have a small dataset. We will be using the iris dataset imported from the scikit-learn library.

To begin, we will first discuss the basics of kNN. The kNN classifier is a nonparametric classifier that simply stores the training...

You have been reading a chapter from
Hands-On One-shot Learning with Python
Published in: Apr 2020 Publisher: Packt ISBN-13: 9781838825461
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime