Grokking Algorithms



Download 6,4 Mb.
Pdf ko'rish
bet92/120
Sana21.12.2022
Hajmi6,4 Mb.
#893167
1   ...   88   89   90   91   92   93   94   95   ...   120
Bog'liq
Grokking Algorithms An Illustrated Guide for Programmers and Other

Feature extraction
In the grapefruit example, you compared fruit based on how
big they are and how red they are. Size and color are the
features
you’re comparing. Now suppose you have three fruit. You can extract 
the features.
hen you can graph the three fruit.
From the graph, you can tell visually that fruits A and B are similar. 
Let’s measure how close they are. To ind the distance between two 
points, you use the Pythagorean formula.


192
Chapter 10
 
 
I
 
 
k-nearest neighbors
Here’s the distance between A and B, for example.
he distance between A and B is 1. You can ind the rest of the 
distances, too.
he distance formula conirms what you saw visually: fruits A and B
are similar. 
Suppose you’re comparing Netlix users, instead. You need some 
way to graph the users. So, you need to convert each user to a set of 
coordinates, just as you did for fruit.


193
Building a recommendations system
Once you can graph users, you can measure the distance between them. 
Here’s how you can convert users into a set of numbers. When users 
sign up for Net
lix, have them rate some categories of movies based on 
how much they like those categories. For each user, you now have a set 
of ratings!
Priyanka and Justin like Romance and hate Horror. Morpheus likes 
Action but hates Romance (he hates when a good action movie gets 
ruined by a cheesy romantic scene). Remember how in oranges versus 
grapefruit, each fruit was represented by a set of two numbers? Here, 
each user is represented by a set of ive numbers.
A mathematician would say, instead of calculating the distance in two 
dimensions, you’re now calculating the distance in 
ive 
dimensions. But 
the distance formula remains the same.


194

Download 6,4 Mb.

Do'stlaringiz bilan baham:
1   ...   88   89   90   91   92   93   94   95   ...   120




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish