Machine Learning, Gradient Descent, Programming.
and the labels: (predict(X, w) — Y). The result is an array of prediction errors. It multiplies each input in X by the matching prediction error. It averages the results. Finally, it multiplies everything by 2. Those are the steps that gradient_one_input() goes through. Now let’s see how