ML Course-3 Week 2

{code removed by mentor, since it violates community guideline to post solution}
I’m getting a error over here.
Is my code right?


i think u focused on the reg term and good job on that but u didnt include the cost function of the features. Also looping ur reg term over in range of nm makes it super huge. for each iteration , u are doing it once so essentially u have a reg term that is j x reg_term

another issue is the J/2, ur reg term has already been divided by 2 so doing it once more in the find line is making it smaller which is incorrect.