I am new to Python and I would like to fit a ridge binomial regression. I know that binomial regression is available at: http://statsmodels.sourceforge.net/devel/glm.html
I also know that logistic regression with L2 penalty can be fitted with sklearn.linear_model.
http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html
As binomial is sum of Bernoulli, I could use scikit after transforming my binomial structured data into Bernoulli structure, by changing its i^th row:
(size_i, success_i)
into a vector of length size_i recording success_i 1 and size_i - success_i 0. However, this does not work for me as size_i is very large.
Is there way to fit Binomial ridge regression using Python?