Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Machine Learning with scikit-learn Quick Start Guide

You're reading from  Machine Learning with scikit-learn Quick Start Guide

Product type Book
Published in Oct 2018
Publisher Packt
ISBN-13 9781789343700
Pages 172 pages
Edition 1st Edition
Languages
Author (1):
Kevin Jolly Kevin Jolly
Profile icon Kevin Jolly

Table of Contents (10) Chapters

Preface Introducing Machine Learning with scikit-learn Predicting Categories with K-Nearest Neighbors Predicting Categories with Logistic Regression Predicting Categories with Naive Bayes and SVMs Predicting Numeric Outcomes with Linear Regression Classification and Regression with Trees Clustering Data with Unsupervised Machine Learning Performance Evaluation Methods Other Books You May Enjoy

Model optimization

The fundamental objective of the linear regression algorithm is to minimize the loss/cost function. In order to do this, the algorithm tries to optimize the values of the coefficients of each feature (Parameter1), such that the loss function is minimized.

Sometimes, this leads to overfitting, as the coefficients of each variable are optimized for the data that the variable is trained on. This means that your linear regression model will not generalize beyond your current training data very well.

The process by which we penalize hyper-optimized coefficients in order to prevent this type of overfitting is called regularization.

There are two broad types of regularization methods, as follows:

  • Ridge regression
  • Lasso regression

In the following subsections, the two types of regularization techniques will be discussed in detail, and you will learn about how...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}