L1 & L2 loss functions
helps a ml model to reduce error and avoid overfitting, for regression we use loss functions
- l1 loss > mean absolute error (MAE)
- l2 loss > mean squared error (MSE)
for L1 loss function measures your absolute difference between the actual value and the predicted value
therfore the graph is linear for error and penalty
if the error comes to be 10 then the penalty is 10
>> error = penalty
hence big errors don'ts get excessive penalties. In L1 every unit of error is equally bad
This is also called Mean Absolute Error(MAE).
for L2 loss function measure the overall discrepancy between a models predicted values and the actual target value by summing up the error before average
therfore the graph is linear for error and penalty
if the error comes to be 10 then the penalty is 100
>> (error)^2 = penalty
hence it reduces large error firsts by making adjustments
During training
model make predictions
|
computes the absolute error
|
use gradient descent to adjust weights to reduce errors
w = w − η × gradient
Total loss = Actual loss + penality
for L1 > Λ + sum( | Wi | )
for L1 > Λ + sum( (| | W | |i )^2 )
L1 is more resistant to outliers, while L2 is more sensitive to them
When you decide to be a math major to study pure mathematics, these are some of the math courses you will be encountering. It's been over 20 years for me since grad school days and I still remember the fun times in those classes. I focused on Real/Complex analysis, Topology, and
Another reason not to drop off the track and continue with the pace .
A list just dropped at the department containing all first-class students across all levels ,
I spotted my name 🫣 .
It's too early to be proud, honestly ..
I hope the energy continues .