Hands-On Machine Learning with Scikit-Learn and TensorFlow


Decision Function and Predictions



Download 26,57 Mb.
Pdf ko'rish
bet139/225
Sana16.03.2022
Hajmi26,57 Mb.
#497859
1   ...   135   136   137   138   139   140   141   142   ...   225
Bog'liq
Hands on Machine Learning with Scikit Learn Keras and TensorFlow

Decision Function and Predictions
The linear SVM classifier model predicts the class of a new instance x by simply com‐
puting the decision function w
T
x + 
b

w
1
x
1



w
n
x
n

b
: if the result is positive,
the predicted class 
ŷ
is the positive class (1), or else it is the negative class (0); see
Equation 5-2
.
Equation 5-2. Linear SVM classifier prediction
y
=
0 if w
T
+
b
< 0,
1 if w
T
+
b
≥ 0
168 | Chapter 5: Support Vector Machines


3
More generally, when there are 
n
features, the decision function is an 
n
-dimensional 
hyperplane
, and the deci‐
sion boundary is an (
n
– 1)-dimensional hyperplane.
Figure 5-12
shows the decision function that corresponds to the model on the left of
Figure 5-4
: it is a two-dimensional plane since this dataset has two features (petal
width and petal length). The decision boundary is the set of points where the decision
function is equal to 0: it is the intersection of two planes, which is a straight line (rep‐
resented by the thick solid line).
3
Figure 5-12. Decision function for the iris dataset
The dashed lines represent the points where the decision function is equal to 1 or –1:
they are parallel and at equal distance to the decision boundary, forming a margin
around it. Training a linear SVM classifier means finding the value of w and 
b
that
make this margin as wide as possible while avoiding margin violations (hard margin)
or limiting them (soft margin).

Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   135   136   137   138   139   140   141   142   ...   225




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