Challenge

Supervised Learning - Prediction Week 3 Challenge

Answer 1:

Code is attached in given file : Week-3.ipynb

Answer 2:

The difference between L1 & L2 methods is on the type of regularisation effect on absolute value of model's weight.

L1 shows sparsity by pushing most of the weigths towards zero, making some of them to be exactly zero. While  L2 shrinks the weight towards zero but does not force them to become zero.

Answer 3:

Different loss functions for regression : 

  • Mean Squared Error(MSE) : it is the sum of squared distances between our target variable and predicted values.
  • Mean Absolute Error(MAE) : it is the sum of absolute differences between our target and predicted variables.
  • Smooth Mean Absolute Error : it is less sensitive to outliers in data than the squared error loss.

Answer 4:

Learning rate is an important factor that determines how fast the function parameter approaches a nominal value. 

High learning rate will cause the function to underflow beyond its lowest value and hence will never reach its lowest value.

Low learning rate will cause the function to approach the lowest value very slowly leading to a high number of iterations and much time consuming as well.

Answer 5:

Linear regression can be evaluated by determining how good the fit is, i.e. what is the error between the predicted value and the data set.  

We will use different error functions to compute the deviation of any random initial function and try to optimise it and reduce the error function value to bare minimum.

Answer 6:

Multiple coefficient of determination measures the amount of variation in the response variable that can be explained by the predictor variables. The fundamental point is that when you add predictors to your model, it will always increase, as a predictor will always explain some portion of the variance.

Adjusted coefficient of determination controls against this increase, and adds penalties for the number of predictors in the model. Therefore it shows a balance between the most parsimonious model, and the best fitting 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.