Supervised Learning - Prediction Week 3 Challenge
Question 1 (Explanation):-
Gradient Descent :-
Gradient Descent is an optimization algorithm used for minimizing the cost function in various machine learning algorithms. Gradient descent is an optimization algorithm that is commonly used to train machine learning models and neural networks. Training data helps these models learn over time, and the cost function within gradient descent specifically acts as a barometer, gauging its accuracy with each iteration of parameter updates. Until the function is close to or equal to zero, the model will continue to adjust its parameters to yield the smallest possible error.
Python code will be attached below in the name "Week 3 ML_Python"
Question 2:
| L1 | L2 |
1)L1 is Mean Absolute Error (MAE) |
1) L2 is Mean Squared Error (MSE) |
|
2)Mean Absolute Error is another loss function used for regression models. |
2) Mean Squared Error is the most commonly used regression loss function. |
|
3)L1 it measures the average magnitude of errors in a set of predictions without considering their directions. |
3) MSE is the sum of squared distance between our target variable and predicted values. |
|
![]() |
Question 3:
1) Mean Squared Error/L2
2)Mean Absolute Error / L1 Loss
3)Root Mean Squared Error
4)Mean Bias Error
5)Huber Loss
6) Hinge
Question 4:
In order to find the best linear fit from loss functions,differentiation of error gives tangent, but we want tangent to move as slowly as possible and that is possible by learning rate, it allows the tangents to move slowly. In most cases, the learning rate is 0.001.
Question 5:
Coefficient of determination (R^2). If the RA2 is close to one then our prediction of what we are making is with
good accuracy. If R^2 value goes down from 1 to 0 then our prediction is that further from the accuracy. Make sure R^2 is close to one. R^2 is a measure of evaluating the best fit curve.
Question 6:
The adjusted coefficient of determination is a modified version of the coefficient of determination(R^2). An adjusted
coefficient of determination will increase only if a new data point improves the regression more than you expected.
the adjusted coefficient of determination does not include all data points it is always lower than the coefficient of
determination(R^2).
The multiple coefficients of determination measure the portion of the variation in the dependent variable that can be
predicted from independent variables.
Multiple coefficients of determination= the sum of squares of determination/total sum of squares
**Week 3 Challenge Complete**
Thank you!!
