rasbt / python-machine-learning-book

The "Python Machine Learning (1st edition)" book code repository and info resource
MIT License
12.18k stars 4.39k forks source link

SoftmaxRegression - zero_init_weight missing #10

Closed theiling closed 8 years ago

theiling commented 8 years ago

Hello, I think the function zero_init_weight is missing. I searched the github site but did not find it. Maybe this is another version of the softmax-regressor and here it is missing?

Best Regards, Thomas

rasbt commented 8 years ago

Thanks for the heads-up, Thomas, it should be fixed now! The zero_init_weight was a left-over from te logistic regression implementation (which I used as a template). In practice, it's better to initialize the weights with small, random and normal distributed values, which is why I decided to remove that parameter (also, I renamed it to init_params to be less ambiguous, since we work with weights and the bias parameters separately in this implementation).