Ridge & Lasso Regression
Before going for ridge & lasso regression, you need to understand few terminologies first. So, Let's start! Imagine you're teaching a robot to recognize different types of fruits based on their weight. You decide to use a simple model: if the fruit weighs less than 100 grams, it's a grape; if it weighs more, it's an apple. Bias : Imagine all the fruits in your training data are apples, and there are no grapes. Your model will learn that everything is an apple, leading to a high bias. This is like teaching the robot that everything, regardless of weight, is an apple . Variance : Now, imagine your training data has a mix of apples and grapes, but you teach the robot to recognize each fruit by its exact weight , including the weight of imperfections and stickers. Your model will learn these specific details, leading to a high variance. This is like teaching the robot to identify each fruit by its unique weight, even if it's just a tiny bit different. In this exa...