Some Bits: Nelson's log

IPython and inline matplotlib

I’m trying out IPython. I’m also playing around with machine learning which means I need some simple data visualization, so I’m playing around with matplotlib. Here’s how to display generated plots inline (as opposed to in a popup window); the docs are inconsistent.

QT: ipython qtconsole --matplotlib inline

Notebook: launch with “ipython notebook”, then run “%matplotlib inline” in a notebook.

Here’s a sample program that generates and shows a plot:

from matplotlib import pyplot as plt
years = range(1950, 2020, 10)
gdp = [300, 543, 1075, 2862, 5979, 10289, 14958]
plt.plot(years, gdp, color='green', marker='o', linestyle='solid')
plt.show()

Comments

Did you get anything interesting back when asking the lazyweb for survey material on machine learning?

I'm working through Joel Grus' "Data Science from Scratch", which has you writing your own Python analysis code. It's a bit lower level than I had in mind but a good exercise. http://shop.oreilly.com/product/0636920033400.do

The most consistent recommendation was this free mathematically-oriented textbook: http://statweb.stanford.edu/~tibs/ElemStatLearn/

I have the Python one, found it a bit broader and shallower than I expected. The other one I hadn't seen, looks interesting, thanks!