# Understanding Bagged Logistic Regression (and a Python Implementation)

Particularly, this paragraph:

Step 1. For a given data set, sample a proportion (ps) of all the sample observations and a proportion (pc) of all the covariates. Fit a logistic regression model on the sampled covariates and the sampled data. Record the estimated coefficients -- we recommend to choose ps and pc to take values around 0.5 if both the variability and the accuracy are of the concern

Can someone please explain what this means in (hopefully) plain english? Based on my understanding, the idea is to just keep running the logistic regression on .5 random subsets of the sample data and then average all of the log odd coefficients that meet a .5 selection threshold?

Completely Optional Bonus points 1: On a side note, is this implementation similar to the idea of randomized logistic regression in scikit learn for python? If not, what is the difference? http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.RandomizedLogisticRegression.html

Completely Optional Bonus points 2: is there a way to incorporate ordered effects into a bagged logistic regression model (e.g. the order in which the predictor variables, in this case advertisements, appeared -- however this is of seconday concern to the primary question)

• Not enough rep to comment, so adding this as a supplement to what has been suggested thus far. You can use the sklearn.ensemble.BaggingClassifier to accomplish what the authors did. BaggingClassifier – Jason Wolosonovich Apr 20 '18 at 20:39

In the quote ps is the fraction of the rows/items included in each sample and pc is the fraction of columns/features. They just use a more statistics flavored terminology where observations are the rows and covariates are the columns.
This is close to what sklearn.linear_model.RandomizedLogisticRegression does internally. The main differences are that RandomizedLogisticRegression does not support column sampling and also it is not a predictive model. It is only used to select relevant features.
• sklearn.linear_model.RandomizedLogisticRegression will be removed in version 0.21 – Jan Kukacka Oct 16 '18 at 12:50