Hands-On Machine Learning with Scikit-Learn and TensorFlow



Download 26,57 Mb.
Pdf ko'rish
bet109/225
Sana16.03.2022
Hajmi26,57 Mb.
#497859
1   ...   105   106   107   108   109   110   111   112   ...   225
Bog'liq
Hands on Machine Learning with Scikit Learn Keras and TensorFlow

Algorithm
Large 
m
Out-of-core support Large 
n
Hyperparams Scaling required Scikit-Learn
Normal Equation Fast
No
Slow
0
No
n/a
SVD
Fast
No
Slow
0
No
LinearRegression
Gradient Descent | 131


9
A quadratic equation is of the form 
y

ax
2

bx

c
.
Algorithm
Large 
m
Out-of-core support Large 
n
Hyperparams Scaling required Scikit-Learn
Batch GD
Slow
No
Fast
2
Yes
SGDRegressor
Stochastic GD
Fast
Yes
Fast
≥2
Yes
SGDRegressor
Mini-batch GD
Fast
Yes
Fast
≥2
Yes
SGDRegressor
There is almost no difference after training: all these algorithms
end up with very similar models and make predictions in exactly 
the same way.
Polynomial Regression
What if your data is actually more complex than a simple straight line? Surprisingly,
you can actually use a linear model to fit nonlinear data. A simple way to do this is to
add powers of each feature as new features, then train a linear model on this extended
set of features. This technique is called 
Polynomial Regression
.
Let’s look at an example. First, let’s generate some nonlinear data, based on a simple
quadratic equation
9
 (plus some noise; see 
Figure 4-12
):
m
=
100
X
=
6
*
np
.
random
.
rand
(
m

1

-
3
y
=
0.5
*
X
**
2
+
X
+
2
+
np
.
random
.
randn
(
m

1
)
Figure 4-12. Generated nonlinear and noisy dataset

Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   105   106   107   108   109   110   111   112   ...   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