[scikit-learn] NearestNeighbors without replacement

Randy Ellis randalljellis at gmail.com
Sun Apr 1 21:36:43 EDT 2018


Hello to the Scikit-learn community!

I am doing case-control matching for an electronic health records study. My
question is, is it possible to run Sklearn's NearestNeighbors function
without replacement? As in, match the treated group to the untreated group
without re-using any of the untreated group data points? If so, how? By
default, it uses replacement. I know this because I tested it on some data
of mine.

The code I used is in the confirmed answer here:
https://stats.stackexchange.com/questions/206832/matched-pairs-in-python-propensity-score-matching

Thanks so much in advance,

-- 
*Randall J. Ellis, B.S.*
PhD Student, Biomedical Science, Mount Sinai
Special Volunteer, http://www.michaelideslab.org/, NIDA IRP
Cell: (954)-260-9891
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20180401/4f6af422/attachment-0001.html>


More information about the scikit-learn mailing list