Hands-On Machine Learning with Scikit-Learn and TensorFlow



Download 26,57 Mb.
Pdf ko'rish
bet99/225
Sana16.03.2022
Hajmi26,57 Mb.
#497859
1   ...   95   96   97   98   99   100   101   102   ...   225
Bog'liq
Hands on Machine Learning with Scikit Learn Keras and TensorFlow

Linear Regression | 117


2
The demonstration that this returns the value of θ that minimizes the cost function is outside the scope of this
book.
The MSE of a Linear Regression hypothesis 
h
θ
on a training set X is calculated using
Equation 4-3
.
Equation 4-3. MSE cost function for a Linear Regression model
MSE X,
h
θ
= 1
m

i
= 1
m
θ
T
x
i

y
i
2
Most of these notations were presented in 
Chapter 2
 (see 
“Notations” on page 46
).
The only difference is that we write 
h
θ
instead of just 
h
in order to make it clear that
the model is parametrized by the vector θ. To simplify notations, we will just write
MSE(θ) instead of MSE(X
h
θ
).
The Normal Equation
To find the value of θ that minimizes the cost function, there is a 
closed-form solution
—in other words, a mathematical equation that gives the result directly. This is called
the 
Normal Equation
 (
Equation 4-4
).
2
Equation 4-4. Normal Equation
θ X
T
X
−1
X
T
y
• θ is the value of θ that minimizes the cost function.
• y is the vector of target values containing 
y
(1)
to 
y
(
m
)
.
Let’s generate some linear-looking data to test this equation on (
Figure 4-1
):

Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   95   96   97   98   99   100   101   102   ...   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