machinelearninginaction
machinelearninginaction copied to clipboard
Chapter 5, Logistic regression may have error
In your source code of Chapter 5, Line26, the weight's dimension is n + 1
. But other places, like Line58 and Line67, only have n
. I think you may not contain intercept term
of this model.
weights = np.ones((3, 1))
and I get
array([[1.],
[1.],
[1.]])
where $weight \in \mathds{R}^{3 \times 1}$, so I guess you have a misunderstanding?