Skip to content

Instantly share code, notes, and snippets.

@daveray
Created October 28, 2013 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daveray/7202354 to your computer and use it in GitHub Desktop.
Save daveray/7202354 to your computer and use it in GitHub Desktop.
Explain yourself

Say you have a function that filters a user's viewing history (sequence of maps, one for each "view" record) based on a bunch of criteria:

  • User's country
  • User's A/B test allocations
  • Whether they watched a standalone movie or episode of a series.
  • How much they watched
  • Have they watched it before
  • etc

These are all combined in a non-trivial way to decide whether a viewing record is included in the output.

What's a principled, hopefully generic way of "explaining":

  • why was a particular record retained?
  • why was a particular record removed?

I'm not quite sure what I'm looking for. REPL exploration helps a lot, but I'd like something more, but ideally not ad hoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment