pbharrin / machinelearninginaction

Source Code for the book: Machine Learning in Action published by Manning

Home Page:manning.com/pharrington

Repository from Github https://github.compbharrin/machinelearninginactionRepository from Github https://github.compbharrin/machinelearninginaction

Chapter 5, Logistic regression may have error

OnlyBelter opened this issue · 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.

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?