I am having trouble following the loss expression as written
Shouldn’t the expression y^{(i)} be written as y[i] ?
after all it looks that way in code
loss = -y[i] * np.log(f_wb) - (1 - y[i]) * np.log(1 - f_wb)
I am having trouble following the loss expression as written
Shouldn’t the expression y^{(i)} be written as y[i] ?
after all it looks that way in code
loss = -y[i] * np.log(f_wb) - (1 - y[i]) * np.log(1 - f_wb)
The mathematic notation uses superscripts.
The code uses vector indices. There’s no direct syntax for a superscript in python.