Monday, 5 November 2012

Wing-fail

This semester I'm teaching a new course which I'm finding a lot of fun.  I don't much like the title, which is "Modern Computational Techniques", but it was chosen in homage to my colleague's Modern Analytical Techniques course, which explores some advanced experimental methods.  My course covers a range of (somewhat) advanced computational techniques that one doesn't necessarily otherwise see at undergraduate level - at least on a physics course.  It starts off with the use of the LAPACK linear algebra package to solve finite-differenced versions of various differential equations, with examples taken from electrostatics and quantum mechanics.  Then it moves on to a range of algorithms: The FFT, neural networks and genetic algorithms, and then on to Monte Carlo methods and finally some parallel programming.  It's a substantial enough module in terms of credits and time taken to go into the techniques in some detail, and each week I've got three hours with the students, first in a 2h class, then a 1h class.

I've scheduled the 2h class in a regular teaching room and spend the first hour going over the material on the board, and the second writing live and trying to be collaborative with the students, a code that solves the problem / uses the technique at hand.  The one hour class is in the computer lab with the students given an exercise to do.  The second hour of the two hour class can be a bit hairy, in that there's no guarantee that we'll be able to construct a working code and there is a certain amount of "winging it." Of course, I try to make sure that it is achievable, and work through the problem in advance, but today in week 6 of the course I failed to write a working code for a multilayer neural network and train it to be an XOR gate.  It didn't help that I made an error in deriving the learning rule in the first hour, in which the derivative of the error with respect to the weights in the neural network could not have been worked out, but I thought using a finite difference would work in the program just as well.  It should have... but I didn't quite make it by the end of the 50 minute slot.  Too bad.  Sorry class!  I hope that you're generally enjoying the course, though.