Regularization – SMART Trading Strategies https://smarttradingstrategies.com Statistical and Mathematical Approach to Retail Trading Wed, 15 Dec 2021 09:25:52 +0000 en-US hourly 1 https://smarttradingstrategies.com/wp-content/uploads/2021/08/logo-150x150.png Regularization – SMART Trading Strategies https://smarttradingstrategies.com 32 32 How to do Linear, LASSO, Ridge and ElasticNet Regression in sklearn https://smarttradingstrategies.com/how-to-do-linear-regression-lasso-regression-ridge-regression-and-elasticnet-regression-in-sklearn/ https://smarttradingstrategies.com/how-to-do-linear-regression-lasso-regression-ridge-regression-and-elasticnet-regression-in-sklearn/#respond Thu, 11 Nov 2021 05:40:32 +0000 https://smarttradingstrategies.com/?p=745 This tutorial demonstrates how to do 4 types of regression in sklearn – Linear, LASSO, ridge and ElasticNet.

LASSO, ridge and ElasticNet regression are regularized forms of regression that aim to constraint the model by reducing the model coefficients (aka weights). The purpose is to reduce the variance in the model. Due to the bias-variance tradeoff, this inevitably leads to a higher bias (and hence, higher RMSE and lower R2 scores).

Nonetheless, regularization should help to reduce overfitting.

Link to Code (as HTML file)

Regression.html

]]>
https://smarttradingstrategies.com/how-to-do-linear-regression-lasso-regression-ridge-regression-and-elasticnet-regression-in-sklearn/feed/ 0