I'm having a difficulty understanding how the loop in this logistic regression example from Numba's documentation (https://numba.readthedocs.io/en/stable/user/parallel.html#numba-parallel) could be parallelized:
@numba.jit(nopython=True, parallel=True)
def logistic_regression(Y, X, w, iterations):
for i in range(iterations):
w -= np.dot(((1.0 / (1.0 + np.exp(-Y * np.dot(X, w))) - 1.0) * Y), X)
return w
I mean the dot product in each iteration of the loop clearly depends on the value of w computed in the previous iteration. so how is this parallelized and what am i missing in here?