Question: Exercise 6 Please complete the compute _ gradient _ reg function below to modify the code below to calculate the following term m w j
Exercise
Please complete the computegradientreg function below to modify the code below to calculate the following term
for dots
The starter code will add this term to the returned from computegradient above to get the gradient for the regularized cost function.
If you get stuck, you can check out the hints presented after the cell below to help you with the implementation.
# UNQC
def computegradientregX y w b lambda:
Computes the gradient for logistic regression with regularization
Args:
X : ndarray Shape mn data, m examples by features
y : ndarray Shape m target value
w : ndarray Shape
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
