Binomial Logistic Regression with multiple features


I’m trying to run a multi feature binomial logistic regression and running into problems. I’m using as reference and modifying number of features, D. However, modifying ‘D’ to > 1 will fail at the the (line 74, because the matrix (400,1) doesn’t align with vector D > 1).

I’d also really appreciate if someone has intuition for the “inputs” initialization (line 73). Currently, “inputs” is set to 400 evenly spaced points from -5 to 3, but why is it set this way? How will it have to change if I increase D?

Thanks in advance for the help!


Fortunately, the other example using importance weighted VI works with larger D.