Will it Python? Machine Learning for Hackers, Chapter 1, Part 5: Trellis graphs.

UPDATE 1/15/2014: This blog is no longer in service.

This post is now located at: http://slendermeans.org/ml4h-ch1-p5.html

Thanks,
-c.

Advertisements
This entry was posted in Will it Python and tagged , , . Bookmark the permalink.

8 Responses to Will it Python? Machine Learning for Hackers, Chapter 1, Part 5: Trellis graphs.

  1. boothead says:

    This is a great series! Have you had a look at the d3.js library for visualisation?

    • Carl says:

      I have, though I’ve only looked through the examples and a couple of introductory tutorials. (I was also at Mike Dewar’s “Getting Started” talk on it for the NYC Open Stats Meetup).

      I discussed it a bit in this post. d3’s apparent comparative advantage–delivering high quality interactive graphics over the web–is of limited use for me. I think there are two issues with it: (1) for the simpler, static graphs that represent the bulk of what I generate, d3 requires way too much coding and low-level manipulation; and (2) if I’m doing all my data work in R or Python, I’d rather not have to swap over to JS for my graphs. (Mike Dewar’s d3py might be dealing with these issues but that’s a ways off).

      I’ve seen some neat stuff done with it (and some useless but pretty stuff done with it). For 90% of what I do, though, it seems like overkill. But, I am planning to explore it some more and keep an eye on what folks are doing with it.

  2. This is pretty awesome. When I have a bit more time I’ll provide some tips / alternative pandas solutions but all looking very good.

    • Carl says:

      Wes — That would be fantastic. I’m sure I’m doing some clumsy or unnecessary things.

      For this part, I considered unstacking the data (so that each state was a column), then using the df.plot(subplots=True) method, but that just gave me a 50-by-1 layout. Going through the docs and messing around, it seemed the only way to control the subplot layout was to pass the plots to each subplot “axis” manually, which is what I’ve done here.

  3. Pingback: Will it Python? Machine Learning for Hackers, Chapter 2 | Slender Means

  4. As of Jan 2013…there is a library d3 for python. A copy is here https://github.com/bigsnarfdude/d3py

  5. Bob says:

    Btw – pandas now has rplot, which handles Trellis and density plots like a charm with a *really* simple interface. You should definitely check it out!

Comments are closed.