Regularization in machine learning: fundamentals and more | The Odyssey Online
Start writing a post
Student Life

Regularization in machine learning: fundamentals and more

Regularization

22
Regularization in machine learning: fundamentals and more

In This Article:

In most cases, the role of a machine learning tool is to process data and deliver results. The processing, however, is preprogrammed.

A machine learning model is usually trained to process data using one or multiple layers of algorithms. This training requires a lot of relevant data and the accuracy is directly related to the volume of data. Under-performance in machine learning can be explained by two major phenomena; Underfitting and overfitting. Both the phenomena are a direct result of over and undertraining. A machine learning tool is trained in detail. The noises and patterns in the data can thus be deciphered. The depth of training determines how optimized a machine learning tool will be to reduce the noises and unwanted irregularities but not the hidden information.

What are underfitting and overfitting?

Underfitting is a condition, where a machine learning tool is undertrained and fails to recognise the patterns and hidden information from the real-world data. However, the problem remains with the approach of training. And in most cases, the performance on practice data does not change drastically. Thus, trouble is hard to detect before onset.

Overfitting is a situation where a machine learning tool is very much sensitive to picking up noises and unwanted features from the training data. And a model trained with all these irregularities can not be optimized properly. Thus in the face of a massive variety and volume, the tool fails to perform accordingly and tends to pick up even greater amounts of erroneous data.

The mitigation approach: regularization in machine learning

Regularization is a process similar to noise reduction. The process is concerned with the reduction of feature magnitudes while keeping the number of features the same. A machine learning tool, too late to go back to training can be regularized and made into a more efficient rendition of the same. The reduction of features is done in a generalized manner so that the relative magnitudes remain the same. And accuracy is maintained. Mathematically, it reduces the coefficient of features to zero. While keeping the number of features unchanged.

How does it work?

Regularization works by adding a penalty to a complex model. In terms of regression,

y= β0+β1x1+β2x2+β3X3+⋯+βnxn +b

Y in this case is the value that a tool is to predict. X1, X2, X3……………….Xn are the features of Y. the β0, β1, β2………….βn are the biases or weightage that is added to the features. And b in this equation is the intercept. ( y=mx+C )

In the case of regularization, linear regression models try to reduce the values of β and b for the minimization of the cost function.

Regularization in Machine Learning

Preceding this, a loss function is added for the linear regression, which is called the residual sum of squares.

Methods of regularization in machine learning

Ridge regression

  • Ridge regression is a linear regression, in which a small amount of bias is added so that the model becomes more reliable. And worthy of long-term implementation.
  • Ridge regression is also called L2 regression. As it is a regularization technique concerned with reducing complexity from the model. In this regression, the cost function is added to a bias. This bias is known as the ridge regression penalty. The same is proportional to the weightage of each feature.
  • Ridge regression, unlike general polynomial or linear regressions, can be deployed in the case of high collinearity between the independent variables. Ridge regression can be deployed to solve problems with more parameters than samples.
  • Used mostly for mitigation of overfitting.

Lasso regression

  • The least absolute and selection operator or lasso regression is also used for the reduction of complexity from a model.
  • In ridge regression, the penalty generally contains the square of weights, but in lasso regression, the penalty contains absolute weights
  • Due to the absolute nature of weightage, a lasso regression can shrink the slope to zero. Unlike ridge regression, which can only shrink to somewhere near zero.
  • The least absolute and selection (lasso regression) operator enables us to choose from features and reduce overfitting selectively.

Conclusion

Regularization in machine learning is mainly deployed for the reduction of complexity and bringing in the quotient of accuracy in the process of machine learning deployment. It is not always possible to train a machine learning tool with the most appropriate data sets. The practice and target data sets can be very different from each other. And mitigation at the stage of execution can be required more than often. Overfitting in these cases is generally the most common problem. And with the deployment of the right mitigation or regularization approach can be fixed and avoided altogether. However, errors can still remain, but to a negligible extent.

Report this Content
This article has not been reviewed by Odyssey HQ and solely reflects the ideas and opinions of the creator.
campus
CampusExplorer

New year, new semester, not the same old thing. This semester will be a semester to redeem all the mistakes made in the previous five months.

1. I will wake up (sorta) on time for class.

Let's face it, last semester you woke up with enough time to brush your teeth and get to class and even then you were about 10 minutes late and rollin' in with some pretty unfortunate bed head. This semester we will set our alarms, wake up with time to get ready, and get to class on time!

Keep Reading...Show less
Student Life

The 5 Painfully True Stages Of Camping Out At The Library

For those long nights that turn into mornings when the struggle is real.

1894
woman reading a book while sitting on black leather 3-seat couch
Photo by Seven Shooter on Unsplash

And so it begins.

1. Walk in motivated and ready to rock

Camping out at the library is not for the faint of heart. You need to go in as a warrior. You usually have brought supplies (laptop, chargers, and textbooks) and sustenance (water, snacks, and blanket/sweatpants) since the battle will be for an undetermined length of time. Perhaps it is one assignment or perhaps it's four. You are motivated and prepared; you don’t doubt the assignment(s) will take time, but you know it couldn’t be that long.

Keep Reading...Show less
Student Life

The 14 Stages Of The Last Week Of Class

You need sleep, but also have 13 things due in the span of 4 days.

1201
black marker on notebook

December... it's full of finals, due dates, Mariah Carey, and the holidays. It's the worst time of the year, but the best because after finals, you get to not think about classes for a month and catch up on all the sleep you lost throughout the semester. But what's worse than finals week is the last week of classes, when all the due dates you've put off can no longer be put off anymore.

Keep Reading...Show less
Student Life

Top 20 Thoughts College Students Have During Finals

The ultimate list and gif guide to a college student's brain during finals.

357
winter

Thanksgiving break is over and Christmas is just around the corner and that means, for most college students, one hellish thing — finals week. It's the one time of year in which the library becomes over populated and mental breakdowns are most frequent. There is no way to avoid it or a cure for the pain that it brings. All we can do is hunker down with our books, order some Dominos, and pray that it will all be over soon. Luckily, we are not alone in this suffering. To prove it, here are just a few of the many deranged thoughts that go through a college student's mind during finals week.

Keep Reading...Show less
Student Life

28 Daily Thoughts of College Students

"I want to thank Google, Wikipedia, and whoever else invented copy and paste. Thank you."

1776
group of people sitting on bench near trees duting daytime

I know every college student has daily thoughts throughout their day. Whether you're walking on campus or attending class, we always have thoughts running a mile a minute through our heads. We may be wondering why we even showed up to class because we'd rather be sleeping, or when the professor announces that we have a test and you have an immediate panic attack.

Keep Reading...Show less

Subscribe to Our Newsletter

Facebook Comments