Supervised Learning - Prediction Week 3 Challenge
1. attached in .ipynb format
2.
L1 and L2 are regularization techniques used in machine learning to prevent overfitting. They work by adding a penalty term to the loss function during training
The main difference between L1 and L2 gradient descent methods lies in the penalty term added to the loss function.
L1 regularization encourages sparsity in the model's parameters by shrinking some of them to zero, while
L2 regularization tends to distribute the weight of the model's parameters more evenly.
3.
RSME - Root Square Mean Error
MSE- Mean Square Error
MAE - mean Absolute Error
4.
Learning rate is a scalar, a value that tells the machine how fast or how slow to arrive at some conclusion
The learing rate is important because it tells how quickly the model has adapted to the problem
other importance include :
speed of convergence
avoiding local minima
Robustness to voice
Generalization
5.
In Python :
- Load the data into python.
- Make sure your data meet the assumptions.
- Perform the linear regression analysis.
- Check for homoscedasticity.
- Visualize the results with a graph.
- Report your results.
Through mathematics:
We need the best Suitable line where we get the minimum error for that we use linear regression.
basic formula : Y = a + a1x1 +a2x2 + e
we use different methods of linear regression to find error like:
RMSE (Root Square Mean Error)
MSE- Mean Square Error
MAE - mean Absolute Error
after finding the error
We use gradiant decent method fory comparing the values of b and m(coefficients) where we can find minimum error
6.The multiple R-squared is calculated by taking the square of the correlation coefficient between the predicted and actual values of the dependent variable. It measures the overall goodness of fit of the model with all the independent variables.
On the other hand, the adjusted R-squared takes into account the number of independent variables in the model. It is calculated as 1 - [(1 - R2)*(n - 1)/(n - k - 1)], where n is the number of observations and k is the number of independent variables. The adjusted R-squared penalizes the model for including unnecessary independent variables, and it usually results in a lower value compared to the multiple R-squared.