Machine Learning – Day 2

Day 2 of the Machine Learning MSc module at Manchester saw us learning about Decision Trees and the role that entropy, linear correlation and mutual information can play.

It’s all about categorical data (like name, a set of fixed values), whereas last week was about the automated classification of continuous data (like temperature, a smooth range of values). The algorithms we were looking at to automatically build decision trees using the inherent statistical and probabilistic properties of a set of data to try and maximise the decision accuracy with the minimum overhead of computation and memory.

Today’s stuff didn’t seem too tricky, and last week’s lab assessment went pretty well.

This week, we need to use the mi() and h() fuctions from the a Matlab Mutual Information library here. Sounds great, but – I’m getting problems using it referring to undefined symbols that may be related to the 64-bit OS on this machine, so I’ll need to try a few options to work around that. Need to get that working!

Well, it’s been a long day so I’ll call a close here. Cheers!

Matlab from the Ubuntu Menu

Getting stuff to work from the Ubuntu Menu is pretty straightforward, but I ran into some little problems that confused me with Matlab. This post goes through the steps and difficulties I had, which might be useful in general, not just in relation to Matlab.

First up, I installed the Student Edition of Matlab (currently R2009a and a steal at the student price), taking into account the fact that I’m running a 64-bit OS and the student edition doesn’t come with the 64-bit architecture libraries. Pretty confusing on first install as the installer detects the architecture but then can’t find the libs, but corrected using this guidance on the Mathworks website.

Once you’ve done that, you need to pass the argument ‘-glnx86’ to Matlab every time you start it up.

That’s a pain, plus the other boilerplate to run it in the background – so I tried to set up a menu option using ‘Main Menu’, which is the relevant administrative tool that comes with Ubuntu. It’s in System – Preferences – Main Menu if you’ve not used it before. Here’s a screenshot of it, set up with a Matlab launcher.

Main Menu with Matlab

The obvious thing is to give Main Menu the command that works from the command prompt, but no. Doing this results is strange behaviour where the splash screen fires up, disappears, and nothing. Checking the .xsession-errors log file in my home directory shows what’s happening. The application is launching in command line mode, writing its prompt to stdout, and then being shut down.

Kinda weird, maybe, as launching the app from the command line launches the Matlab GUI. Anyway, you also need to also add a ‘-desktop’ argument to the launcher command. My Matlab is installed in /opt/matlab, remember to change the path as appropriate for you.

The Matlab Launcher

You can also add the icon if you want by clicking where the Matlab icon is shown above, browsing to wherever you installed Matlab then into the ‘X11/icons’ directory, where you’ll find a number of icons.

Now you can launch the program from Main Menu, or drag-dropping it onto a panel, onto your desktop – wherever you like.