Machine Learning: Step-by-Step Guide To Implement Machine Learning Algorithms with Python



Download 1,58 Mb.
Pdf ko'rish
bet20/25
Sana23.03.2022
Hajmi1,58 Mb.
#506035
1   ...   17   18   19   20   21   22   23   24   25
Bog'liq
Machine Learning Step-by-Step Guide To Implement Machine Learning Algorithms with Python ( PDFDrive )

Regularized Linear Models
We have worked, in the first and second chapters, on how to reduce overfitting
by regularizing the model a little, as an example, if you'd like to regularize a
polynomial model. In this case, to fix the problem, you should decrease the
number of degrees.
Ridge Regression
The ridge regression is another version of the linear regression, but, after
regularizing it and adding weight to the cost function, this makes it fit the data,
and even makes the weight of the model as simple as possible. Here is the cost
function of the ridge regression:
As an example of ridge regression, just take a look at the following figures.
Lasso Regression


 
“Lasso” regression stands for “Least Absolute Shrinkage and Selection
Operator” regression. This is another type of the regularized version of linear
regression.
It looks like ridge regression, but with a small difference in the equation, as in
the following figures
The cost function of the lasso regression:
As you can see in the following figure, the lasso regression uses smaller values
than the ridge.


EXERCISES
1. If you have a set that contains a huge number of features (millions of
them), which regression algorithm should you use, and why?
2. If you use batch gradient descent to plot the error at each period, and
suddenly the rate of errors increases, how would you fix this problem?
3. What should you do if you notice that errors become larger when 
you’re using the mini-batch method? Why?
4. From these pairs, which method is better? Why? :
. Ridge regression and linear regression?
. Lasso regression and ridge regression?
5. Write the batch Gradient descent algorithm.


SUMMARY
In this chapter, you've learned new concepts, and have learned how to train a
model using different types of algorithms. You’ve also learned when to use each
algorithm, including the following:
-
Batch gradient descent
-
Mini-batch gradient descent
-
Polynomial regression
-
Regularized linear models
. Ridge regression
. Lasso regression
In addition, you now know the meaning of certain terms: linear regression,
computational complexity, and gradient descent.


REFERENCES
https://docs.scipy.org/doc/numpy-dev/user/quickstart.html
http://scikit-
learn.org/stable/auto_examples/linear_model/plot_polynomial_interpolation.html



Download 1,58 Mb.

Do'stlaringiz bilan baham:
1   ...   17   18   19   20   21   22   23   24   25




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