Python implementation of "Double/Debiased Machine Learning for Logistic Partially Linear Model" by Molei Liu, Yi Zhang and Doudou Zhou. See https://academic.oup.com/ectj/article/24/3/559/6296639
logistic_dml is currently maintained by @sdamerdji.
Bugs can be reported to the issue tracker at https://github.com/sdamerdji/logistic_dml/issues
logistic_dml requires:
- Python (>=3.9)
- Pandas (>=1.5.2)
- SciPy (>=1.9.3)
- NumPy (>=1.23.5)
- scikit-learn (>=1.3.0)
To install logistic_dml with pip use
pip install logistic_dml
logistic_dml can be installed from source via
git clone https://github.com/sdamerdji/logistic_dml.git
cd logistic_dml
pip install .
Example:
from logistic_dml import DML
Y = np.array([1, 1, 1, 1, 0, 0, 1, 0, 1, 0]*2)
A = np.array([1, 1, 0, 0, 0, 0, 0, 0, 1, 1]*2)
X = pd.DataFrame({'X1': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]*2,
'X2': [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]*2})
K = 2
model1 = LogisticRegression()
model2 = LinearRegression()
result = DML(classifier=model1, regressor=model2,random_seed=0).dml(Y, A, X, k_folds=K)
[insert text here]
After installation, you can launch the test suite from inside the source directory,
python test_logistic_dml.py
[insert text here]
Email: [email protected]
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!