Daily Dose of Data Science

Share this post

Try This If Your Linear Regression Model is Underperforming

www.blog.dailydoseofds.com

Discover more from Daily Dose of Data Science

High-quality insights on Data Science and Python, along with best practices β€” shared daily. Get a 550+ Page Data Science PDF Guide and 450+ Practice Questions Notebook, FREE.
Over 36,000 subscribers
Continue reading
Sign in

Try This If Your Linear Regression Model is Underperforming

Change the model or alter the data.

Avi Chawla
Jun 13, 2023
19
Share this post

Try This If Your Linear Regression Model is Underperforming

www.blog.dailydoseofds.com
Share

At times, skewness in data can negatively influence the predictive power of your linear regression model.

If the model is underperforming, it may be due to skewness.

There are many ways to handle this:

  • Try a different model

  • Transform the skewed variable

The most commonly used transformations are:

  • Log transform: Apply the logarithmic function.

  • Sqrt transform: Apply the square root function.

  • Box-cox transform: You can use it using Scipy’s implementation: Scipy docs.

The effectiveness of the three transformations is clear from the image above.

Applying them transforms the skewed data into a (somewhat) normally distributed variable.

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (350+ pages) with 250+ tips.

πŸ‘‰ Over to you: What are some other methods to handle skewness that you are aware of?


πŸ‘‰ Read what others are saying about this post on LinkedIn and Twitter.

πŸ‘‰ Tell the world what makes this newsletter special for you by leaving a review here :)

Review Daily Dose of Data Science

πŸ‘‰ If you liked this post, don’t forget to leave a like ❀️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.

πŸ‘‰ If you love reading this newsletter, feel free to share it with friends!

Share Daily Dose of Data Science


Find the code for my tips here:Β GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

19
Share this post

Try This If Your Linear Regression Model is Underperforming

www.blog.dailydoseofds.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

Β© 2023 Avi Chawla
Privacy βˆ™ Terms βˆ™ Collection notice
Start WritingGet the app
Substack is the home for great writing