Monthly Archives: November 2018

Machine learning in population health: Opportunities and threats

My colleague Theo Vos and I have a perspective published recently in PLoS Medicine, Machine learning in population health: Opportunities and threats. It is not long, so you can skim it in seconds, or read it all in just minutes.

It is not directly related to a short film that I enjoyed recently.  Maybe indirectly.

Comments Off on Machine learning in population health: Opportunities and threats

Filed under Uncategorized

Permutation Game

This summer my kids got a gift of a somewhat boring board game, where players were charged with tracing through a jumble of lines to find out what creature got to eat what dessert.  The name escapes me now, and I escaped taking the game home, too.

But it was not all bad—the mechanics of the game made me google “permutation game” which came up with a fun puzzle (and annoying interview question; this phrasing is from a website that helps people cram for job interviews):

Alice and Bob play the following game:

They choose a permutation of the first  numbers to begin with.

They play alternately and Alice plays first.

In a turn, they can remove any one remaining number from the permutation.

The game ends when the remaining numbers form an increasing sequence. The person who played the last turn (after which the sequence becomes increasing) wins the game.

Assuming both play optimally, who wins the game?

This game turns out to be kind of fun, at least if you find this sort of thing fun. I also tried a twist where we started with a string of letters, and crossed them off until they make a word.

Comments Off on Permutation Game

Filed under Uncategorized

Bootstrap for uncertainty in CSMF estimation

[notebook]

download.png

 

Comments Off on Bootstrap for uncertainty in CSMF estimation

Filed under Uncategorized

One more IDV in Python approach

https://plot.ly/dash/
https://community.plot.ly/c/dash
https://github.com/plotly/dash
https://plot.ly/dash/getting-started
View story at Medium.com

Comments Off on One more IDV in Python approach

Filed under Uncategorized

Its 2018, how to IDV in Python?

I’ve got a fun little viz that I need to demo for Important People (IP) in early March [editor’s note: still not done… that deadline was highly optimistic!]. How to do it?

In Python? Sure. In a Jupyter notebook? Maybe. With Matplotlib? Probably not… at least I better have a look at the state of the alternatives.

Did I mention that it is essential for this viz to be *interactive*? It needs to allow the Important People to explore the predictions of some ML model, or at least allow me to explore them while they call out how to explore.

Years ago, I attempted to designate a particular plot the “hello, world” of data viz. Remember that? I think we should extend it to a hello world of interactive data viz. Maybe just choosing the number of digits is enough. Or should it follow the visual information seeking mantra? But “hello, world” cannot be too complicated.

yhat?

Altair
https://altair-viz.github.io
https://github.com/altair-viz/altair_widgets/blob/master/examples/Iris.ipynb
http://pbpython.com/altair-intro.html

Bokeh
https://bokeh.pydata.org/en/latest/docs/gallery.html#gallery
https://www.analyticsvidhya.com/blog/2015/08/interactive-data-visualization-library-python-bokeh/
https://s3.amazonaws.com/assets.datacamp.com/blog_assets/Python_Bokeh_Cheat_Sheet.pdf
https://www.datacamp.com/courses/interactive-data-visualization-with-bokeh/
https://www.datacamp.com/community/blog/bokeh-cheat-sheet-python
https://demo.bokehplots.com/apps/movies

A Dramatic Tour through Python’s Data Visualization Landscape (including ggplot and Altair)

Comments Off on Its 2018, how to IDV in Python?

Filed under Uncategorized

Schelling’s Segregation Model

Thinking about this since I saw a gentrification talk at CSSS last week [editor’s note: more like a year ago]. Also thinking about engaging demo material for vivarium. Here are some recent links:
https://arxiv.org/abs/1705.03213
https://arxiv.org/ftp/arxiv/papers/1406/1406.5215.pdf
http://nifty.stanford.edu/2014/mccown-schelling-model-segregation/
http://jasss.soc.surrey.ac.uk/15/1/6.html

Comments Off on Schelling’s Segregation Model

Filed under Uncategorized

G.E.P. Box on Model Building

The Edward library http://edwardlib.org/ has made the modeling approach of G.E.P. Box sound appealing to me. Here is some reading on it:

https://www.jstor.org/stable/1266570?seq=1#page_scan_tab_contents
https://www.jstor.org/stable/1266125?seq=1#page_scan_tab_contents
https://www.jstor.org/stable/1266318?seq=1#page_scan_tab_contents
https://www.jstor.org/stable/2286841?seq=1#page_scan_tab_contents
https://www.jstor.org/stable/2982063?seq=1#page_scan_tab_contents

Comments Off on G.E.P. Box on Model Building

Filed under Uncategorized