Re: [scikit-learn] NearestNeighbors without replacement

2018-04-02 Thread Randy Ellis
Hi Jake, Thanks for the reply. Yes, trying this out resulted from looking for ways in python to implement propensity score matching. I found a package, pscore_match (http://www.kellieottoboni.com/pscore_match/), but the matching was really terrible. Specifically, I'm matching based on age, race, g

Re: [scikit-learn] NearestNeighbors without replacement

2018-04-02 Thread Jacob Vanderplas
Hi Randy, I think that approach is probably a good heuristic, but it will not necessarily find the optimal result. That said, if you don't care about having guarantees that you're finding the optimal pairing, but only that you can find a reasonable set of pairs, it will probably work out fine. J

Re: [scikit-learn] NearestNeighbors without replacement

2018-04-02 Thread Randy Ellis
Hi Jake, Thank you for the feedback. Yeah, working without replacement, certain cases are going to more appropriate matches than others. I proposed the idea of using replacement and compensating for the re-use of controls with frequency weighting, but you gotta do what your PI tells you sometimes!