Can someone please explain this to me ? I can understand each line individually but I don’t get it as a whole picture ( I don’t understand how these lines work together, can’t put it in context)
Thank you in advance
The one without vectorization I mean
The for-loop over the index ‘j’ ranges over the features in a single example.
It accumulates the value ‘f’ (which means the function value) by multiplying the weight for each feature by that feature’s value.
Then it adds the bias.
So it computes the sum of the weighted features, plus the bias.
That’s exactly what the vectorized code does.
1 Like