AI Class: Machine Learning
Week 3 of the Stanford AI class was about machine learning. This was kind of handy for me, since my PhD thesis was mostly about applying some unsupervised learning techniques to dimensionality reduction for climate model output. That mean that I’ve read hundreds of papers about this stuff so the basic ideas and even quite a few of the details are already pretty familiar. However, most of what I’ve read has been aimed at applications in climate science and dynamical systems theory. Not much from the huge literature on clustering methods, for instance.
Sebastian very briefly mentioned some of the nonlinear dimensionality reduction methods that have been developed for unsupervised learning applications, but it was nothing more than a mention (no time for anything else). I can’t resist the temptation to dust off a little of this stuff from the archives.
Friday photo #3
Morning paddling preparations on Wallace Island, Gulf Islands National Park. Thanksgiving weekend, 2009.
AI Class: Bayes Networks
The second week of the online Stanford AI class was about probability, reasoning when there is uncertainty and, more specifically Bayes networks. I don’t much want to talk about the theory behind these things here since that’s covered in a lot of detail on the linked Wikipedia page, in the lectures and in AIMA.
Instead, I want to present a mildly amusing, although not very efficient, Haskell implementation of Bayes networks. It’s often said that if you know the full joint probability distribution function (PDF) for a system, you can calculate any marginal or conditional probabilities you want. Well, Haskell is a functional programming language, a PDF is a function, so can we represent the PDF explicitly and use it for calculating? The answer, of course, is yes.
The Zen of Car Ownership
“Pour avoir une voiture, sans avoir une voiture”
To have a car, without having a car
Hakyll Setup
As blogging software, I use the really rather nice Hakyll, by Jasper Van der Jeugt. This is a static website generator written in Haskell, and it’s a great solution for smaller blogs or personal websites.
Hakyll works just fine out of the box, but the blog setup I wanted was a bit different from what I’ve seen other people do with it, so a bit of hacking was required. I wanted to share some of the things I’ve done, since they might be of interest to other Hakyllers (Hakyllites?). All the code is available on Github.
Friday photo #2
Sundown on Wallace Island, Gulf Islands National Park. Thanksgiving weekend, 2009.
AI Class: Tile Puzzle Heuristics
In an earlier post, I presented some code for solving tile puzzles using A* search. In the lectures, Peter Norvig talked about two different heuristics for these puzzles, one simply counting the number of misplaced tiles and the other giving the total Manhattan distance of all misplaced tiles to their correct positions. It’s interesting to find out how much of a difference using these heuristics really makes.
Here’s Winnie!
Winnie is a dog, probably half beagle, half something else. She lives with us now, but her life wasn’t always wall-to-wall belly rubs, salmon for breakfast and as much love as she can stand. We adopted her from the animal shelter where we work as volunteers on September 4, and for 3-4 months before that, she’d been cowering at the back of her cage, frightened even to show her little nose to the people outside.
We think Winnie was raised as a hunting dog, locked up in a kennel with other dogs and no humans to bond with, since she has a bad case of kennel syndrome: she’s scared of more or less everything except other dogs, and now, us. Loud or just sudden noises, cars, bikes, trams, other people, big boxes (no idea why), and so on. All send her into a panic. We think that she probably wasn’t aggressive and confident enough to satisfy the assholes who had her before, so they abandoned her.
Applied Spatial Data Analysis With R
by Roger S. Bivand, Edzer J. Pebesma & Virgilio Gómez-Rubio
I recently had to do a bunch of geostatistical analysis on some climate data (to be specific, using universal kriging to interpolate a time series of solar radiation data covering the region I’m working on to a different grid). I started off trying to use the geostatistical analysis toolbox in ArcGIS, which works fine as far as it goes, but seems to be very difficult indeed to access via ArcGIS’s Python scripting interface. Since I had 36 years of daily data to process, doing it by hand was not an option.
The City & The City
by China Miéville
Can you unsee? Can you unhear? If I ask you not to think of a tiny green rhinoceros wearing a straw hat, can you do it?
AI Class: A* Search
The first week of the online Stanford AI class has gone by. The format of the presentation is pretty good, with lots of short lecture videos chained together with little quizzes embedded. It’s really pretty neat. There are some minor errors in some of the lectures, which is normal, though in this kind of online setting, it’s more difficult for the keener students to correct the lecturer as the lecture goes along, so some people are likely to spend a bit of time confused because of that. Some people have complained on Reddit about the relatively superficial level of the coverage of the lectures, but as far as I’m concerned, that’s what the book (and papers) are for. The course is called “Introduction to Artificial Intelligence”, after all.
The two things we covered this week were a very quick introduction to the field, then some stuff about search. Although there is a big pile of code available for download associated with Russell & Norvig’s AI book which would have made playing with some of this stuff easier, I decided to write some code of my own in Haskell, mostly for my own amusement. I wanted to implement A* search, with a clean interface for setting up problems.
Land cover datasets
In my day job, I work on the ecology of Mediterranean ecosystems in southern France, and if you work on a particular type of ecosystem, the first thing you need to know is where you can find your ecosystem! Seems like a simple problem, but it’s not.
Haskell Comic Scraper: Part 2
Last time, we looked at the basics for a webcomic scraper. In this post, we’ll look at extending our code a little to incorporate some date handling and some simple XML processing.
Friday photo #1
Glanmore Lake, Beara Peninsula. On a holiday to Ireland some years ago.
Stanford AI Class
Along with about 160,000 other people, I’ve signed up for the Stanford Introduction to Artificial Intelligence course. My interest in this is two-fold: first for the material, which should be pretty cool if Peter Norvig’s book is anything to go by, but second for just how they (the two instructors plus presumably an army of TAs) are going to do this.
Perhaps I’m not a very good teacher in a lecture setting, but I have real trouble connecting even to a class of 90 or so students. Most effective teaching occurs one-on-one or in small groups in office hours. And most learning occurs when students are sitting quietly thinking about things themselves. How you make contact with and retain the attention of 85,000 students is a problem that boggles the mind. I’m very interested to see how it goes!
The first couple of modules are up on the website already, and it looks like the format of most of the course will be pretty nice and accessible. How assignments and exams will work, we’ll have to see. I really hope Stanford are supplying some additional resources to help with this project. It’s a very cool thing to be doing, and very exciting, but it has the potential to be a pretty high stress adventure for the instructors!
If AI doesn’t float your boat, Stanford are also running Intro to Machine Learning and Intro to Databases courses online as well.