Given X (n, d), binary labels y (n,) and weights w (d,),
return (loss, grad):
loss is the mean logistic loss, grad its (d,) gradient|X @ w| is around 800Input
X =
[[ 1. 2.]
[ 3. 4.]
[-1. 0.]]
y = [1. 0. 1.]
w = [ 0.5 -0.25]
Output
(0.8804337163067194, array([0.66327911, 0.49661244]))