Question related to Linear regression with scikit-learn notebook

Hi, i am running the Optional lab: Linear regression with scikit-learn notebook
So when i am executing the code shown below i get the output 14257 weight updates which means this that the total number of weight updates that were done on all the training examples is 14257 and 144 iterations were done on the trainings examples as shown below(POV: i am running the code as it is, no changes done)


there are 99 examples in the trainings set, so according to the above output 144 iterations on the 99 training examples i.e 144 * 99 = 14256 weights updates were done on the training set
So my question is 14257 - 14256 = 1, where did this extra 1 weight update came from(if my above understanding is correct or else please correct me)

1 Like

While implementing the code in assignment lab i realized where the extra 1 weight update came from. Here is my calculation
99 training examples * 144 iterations = 14256 times the weights were updated of the 99 training examples in 144 iterations
After adding the values of weights with the respective parameter we divided by m i.e 99, so the weights are updated 1 more time so we get
14256 + 1 = 14257 i.e the answer shown in the code

1 Like