Monthly Archives: June 2015

MCMC in Python: Gaussian mixture model in PyMC3

PyMC3 is really coming along. I tried it out on a Gaussian mixture model that was the subject of some discussion on GitHub: https://github.com/pymc-devs/pymc3/issues/443#issuecomment-109813012 http://nbviewer.ipython.org/gist/aflaxman/64f22d07256f67396d3a

1 Comment

Filed under MCMC, software engineering, statistics

Earth Engine in IPython Notebook

This is cool: http://nbviewer.ipython.org/github/tylere/g4g14-ee-python-api/tree/master/

g-ee-in-ipy-nb

Comments Off on Earth Engine in IPython Notebook

Filed under global health

IDV in Python: Interactive Legend in MPLD3

We got a nice pull request for mpld3 recently, interactive legends. Another chance for me to use my new GIF animation recorder: https://github.com/jakevdp/mpld3/pull/299#issuecomment-110434953

Comments Off on IDV in Python: Interactive Legend in MPLD3

Filed under dataviz, software engineering

Scratching the surface of “Psychology in Patient-Physician Communication”

This short note is interesting, but I think there is a lot more to be said (and to learn) on the matter of health communication: http://oncology.jamanetwork.com/article.aspx?articleid=2294967

Comments Off on Scratching the surface of “Psychology in Patient-Physician Communication”

Filed under health communication

On comparing DALYs

A question from a colleague of a colleague asks “We’re working on how we present the GBD DALY burden for two populatlons of different sizes. Obviously, just comparing the DALYs is not appropriate. Have you ever seen a relative rate published?”

My answer is that the DALY rate (e.g per 100,000 person-year) is just the thing for this: http://ihmeuw.org/3cl8

Comments Off on On comparing DALYs

Filed under global health

Cool stuff from an IDV4GH alum

Hi Abie,

I thought you might be interested in this article that we recently published in the Lancet HIV on “Definitions of Implementation Science in HIV/AIDS.” The full article can be accessed here: http://dx.doi.org/10.1016/S2352-3018(15)00061-2. In this article, we review the use of the term “implementation science” in the HIV scientific literature, then synthesize those existing definitions using network analysis, and finally offer a working definition.

In addition, we used D3 to create an interactive visualization of the network of definitions – available here: http://tinyurl.com/imp-scie-defs-hiv. Hovering over a node reveals the text of the definition; and you can click-and-drag the nodes if any are obscuring author names. Just a few tricks from my days taking your interactive data visualization class 🙂

Thanks for introducing me to interactive data visualization! I very much appreciated your course and I’m happy to have been able to apply your lessons in this article! Hope you’re having a great time with the babies!

Best,
Thomas

Comments Off on Cool stuff from an IDV4GH alum

Filed under global health

Laplace approximation in Python: another cool trick with PyMC3

I admit that I’ve been skeptical of the complete rewrite of PyMC that underlies version 3. It seemed to me motivated by an interest in using unproven new step methods that require knowing the derivative of the posterior distribution. But, it is really coming together, and regardless of whether or not the Hamiltonian Monte Carlo stuff pays off, there are some cool tricks you can do when you can get derivatives without a hassle.

Exhibit 1: A Laplace approximation approach to fitting mixed effect models (as described in http://www.seanet.com/~bradbell/tmb.htm)

http://nbviewer.ipython.org/gist/aflaxman/9dab52248d159e02b2ae

Comments Off on Laplace approximation in Python: another cool trick with PyMC3

Filed under software engineering, statistics

How did GBD find X?

From: Abraham D. Flaxman
Sent: Friday, May 29, 2015 9:46 PM
To: Deepa Rao; Stephen Gloyd
Subject: MOZ Self-Harm in GBD

I didn’t want to get in the way of any presenters today, and I didn’t have a chance to catch you afterwards on the MOZ self-harm estimates from GBD, but we actually have a pretty good tool for digging into questions like this now: http://ihmeuw.org/3c2f

If you click on a data point, it links to a page on the source. In this case, there are two verbal autopsies as sources, one nationally representative, and one for a DSS site: http://ghdx.healthdata.org/record/mozambique-manhi%C3%A7a-health-and-demographic-surveillance-system http://ghdx.healthdata.org/record/mozambique-national-survey-causes-death-2007-2008 on the topic of VA, you might suspect that these measurements are lower than the truth, since stigma, and how is a VA going to get coded to suicide if the respondent says it was an accident?

–Abie

Abraham D. Flaxman
Assistant Professor
Institute for Health Metrics and Evaluation | University of Washington
2301 5th Avenue, Suite 600 | Seattle, WA 98121| USA

Comments Off on How did GBD find X?

Filed under global health

Some thoughts on code review

We’ve been doing a massive code review exercise at IHME this quarter. I think I mentioned it in passing. I have adapted the approach that Philip Guo wrote up in ACM Communications, and forced everyone to use git and comment on pull requests (in stash, Atalassian’s Github alternative, which we host internally).

It has been a good experience for some, but it is time to find out how it worked for all, with a more traditional course evaluation. Fingers crossed.

Comments Off on Some thoughts on code review

Filed under software engineering

Can I use unittest.mock in python?

A question I would like to answer. Perhaps this is the place to start: https://docs.python.org/3/library/unittest.mock.html

Comments Off on Can I use unittest.mock in python?

Filed under software engineering