Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Training Systems Using Python Statistical Modeling

You're reading from   Training Systems Using Python Statistical Modeling Explore popular techniques for modeling your data in Python

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781838823733
Length 290 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Curtis Miller Curtis Miller
Author Profile Icon Curtis Miller
Curtis Miller
Arrow right icon
View More author details
Toc

LASSO regression

In this section, we will look at the basic concept of LASSO regression, including the hyperparameters that it introduces and how to use it in practice.

Put simply, LASSO regression is another method for regularizing a linear model while fittingmore so than OLS. LASSO is extremely similar to ridge regression in form, but the penalty terms are different. In many ways, the two procedures are interchangeable, but they don't necessarily get the same solutions, so you might want to consider looking at both. LASSO regression has the same alpha parameter as ridge regression, and it is used the same way. A larger alpha value penalizes overfitting. So, let's take a look at LASSO in action:

  1. We will import the Lasso object along with the other required libraries, as follows:
  1. We will then fit a LASSO regression model, choosing alpha=1 again, using the...
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 $19.99/month. Cancel anytime
Banner background image