machinelearninginaction icon indicating copy to clipboard operation
machinelearninginaction copied to clipboard

Chapter 5, Logistic regression may have error

Open OnlyBelter opened this issue 6 years ago • 1 comments

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.

OnlyBelter avatar Apr 08 '18 11:04 OnlyBelter

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?

Spico197 avatar Feb 18 '19 16:02 Spico197