Challenge

Supervised Learning - Prediction Week 3 Challenge

2)

The difference between L1 and L2 Gradient descent method are-

  • L1 Regularization, also called a lasso regression, adds the “absolute value of magnitude” of the coefficient as a penalty term to the loss function.
  • L2 Regularization, also called a ridge regression, adds the “squared magnitude” of the coefficient as the penalty term to the loss function.

3)

The different loss functions for regression are-

  • Mean Squared Error- Mean Squared Error(MSE) is the most commonly used regression loss function. MSE is the sum of squared distances between our target variable and predicted values.
  • Mean Absolute Error- Mean Absolute Error(MAE) is the sum of absolute differences between our target and predicted variables.

4)

Learning rate determines how fast or slow we will move towards the optimal weights. If the learning rate is very large we will skip the optimal solution. If it is too small we will need too many iterations to converge to the best values. So using a good learning rate is crucial.

5)

The different evaluation metric for regression models are-

  • Mean Squared Error- Mean Squared Error(MSE) is the most commonly used regression loss function. MSE is the sum of squared distances between our target variable and predicted values.
  • Mean Absolute Error- Mean Absolute Error(MAE) is the sum of absolute differences between our target and predicted variables.
  • Root Mean Squared Error- is one of the most commonly used measures for evaluating the quality of predictions. It shows how far predictions fall from measured true values using Euclidean distance.
  • R Squared- R squared (R2) is a regression error metric that justifies the performance of the model. It represents the value of how much the independent variables are able to describe the value for the response/target variable.
  • Adjusted R squared- Adjusted R squared is calculated by dividing the residual mean square error by the total mean square error (which is the sample variance of the target field). The result is then subtracted from 1. Adjusted R2 is always less than or equal to R2.

6)

The difference between multiple and adjusted coefficient of determination is that when we add predictors to our model, the multiple Rsquared will always increase, as a predictor will always explain some portion of the variance. Adjusted Rsquared controls against this increase, and adds penalties for the number of predictors in the model.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.