Tuesday, April 4, 2006, 11:32 PM
- PhD, Machine Learning
Since 3 is a magic number I'd really like to have 3 different learning algorithms used Smeagol. Currently I have ILP and HAC-clustering, both applied in several different ways. Sequence/Basket analysis seems like a good candidate for third algorithm, since it's the only area of ML not covered yet. (ILP covering classification and more...) Sequence analysis would of course require a time dimension the the data, which i'd really rather not get into, AND it was probably covered pretty well by Heather Maclaren.
Basket analysis is left, and my first attempt was quickly hacked up using Orange. The things in my baskets are predicate-value pairs, and each person becomes a basket on their own. I tried this on several data-sets i had lying around, here are some quick and dirty results:
A small subset of my IMDB Data (3534 triples) gave me:
rdf#type IMDB#Movie -> IMDB#languages English
and
rdf#type IMDB#Movie -> IMDB#country_USA
My email from the last 5 years as crawler by aperture (127615 triples) gave me the fascinating rule:
aperture:mimeType message/rfc822 -> rdf#type imap/Message
A subset of some old FOAF crawl stolen from JibberJim years ago gave me:
jim#isKnownBy norman.walsh#norman-walsh -> rdf#type foaf/Person
yes - fascinating indeed. I also found the Norman Walsh rule using ILP years ago, at least running this one was pretty fast.
I'm not sure what to conclude from this - none of the rules are groundbreaking OR that interesting. Maybe I can tweak the way items are represented, using just values or just predicates for example. I'll see tomorrow.
I also had a brain-storming session with myself and some gin'n'tonic today, and if I don't finish this PhD it's because the table wasn't big enough:
[ 1 comment ] ( 37 views ) | permalink |




( 3 / 2165 )Friday, March 31, 2006, 08:16 PM
- Python
Some friends using Windows only asked me about RDFRoom (Yes! Really!), and I was about to tell them than unless they spent a while installing python, pygame, rdflib, it wasn't gonna happen, but I thought I'll google first. Dada! Enter py2exe! After I spent a bit of time installing python, pygame, rdflib on my vmware image, wrote a 6 line setup.py and ran py2exe (Then fiddled with packaging the right rdflib packages, damn plugin-architecture), I had a RDFRoom.exe which would run without installing any other packages. Amazing. Download RDFRoom.zip for windows NOW! :D
[ add comment ] ( 2 views ) | permalink |




( 3 / 4226 )Thursday, March 30, 2006, 11:53 PM
- RDF, Python
Too late to be verbose now, but after being encouraged by Danny last week, I've spent long evening hacking together this crappy demo. The webpage has all the info you need (including downloads), and the screenshot here should tickle your senses enough to click that link. If you like RDF that is. And you like old-fashioned computer games. And if you're bored. 
Some notes:
- Look at some RDF DATA, schemas dont work well just now.
- Yes i know the fire effect is badly aligned.
- You need data with rdfs:seeAlso links to get doors.
That's it for now, I refuse to waste any more time on this useless nonsense!
(Oh, and I submitted this to the ESWC Semantic Web Scripting Challenge :-)
[ 1 comment ] ( 705 views ) | permalink |




( 3 / 4994 )Tuesday, March 21, 2006, 08:34 PM
- Java
(I try again, with considerably less love than last time)
Opening files in their "natural" application was something I knew had to be done sooner or later for aperture/gnowsis/nepomuk, but I put it off for as long as possible because I had a horrible feeling that to get it to work on all platforms it would be long and messy and maybe involve nasty C code.
Imagine my surprise when in a few hours today I got it working for files, directories and web links, and this on both windows, macosx and linux (kde/gnome). All without leaving the world of Java. The code is so short I will paste it here (beautifully formatted by code2html!)
private void windowsopen(URI uri) throws IOException {
Runtime.getRuntime().exec(
new String [] { "rundll32", "url.dll,FileProtocolHandler",uri.toString() });
}
private void linuxopen(URI uri) throws IOException {
// TODO: I don't know how reliable this is.
// It's set correctly for kde/gnome on my machine
if (System.getenv("DESKTOP_SESSION").toLowerCase().contains("kde")) {
//kde:
Runtime.getRuntime().exec(new String [] { "kfmclient","exec",uri.toString()} );
} else {
//Default to gnome as it complains less if it's not running.
Runtime.getRuntime().exec(new String [] { "gnome-open",uri.toString()} );
}
}
private void macopen(URI url) throws IOException {
try {
Class macopener = Class.forName("com.apple.eio.FileManager");
Method m = macopener.getMethod("openURL",new Class[] {String.class});
m.invoke(null,new Object[] {url.toString()});
} catch (Exception e) {
throw new IOException("Could not open URI: "+url+" - "+e);
}
}
This is for opening http links, but the file code is almost identical, KDE and Windows doesn't like file:// URIs so I convert them to filenames first, and launching things in Windows is done by executing "cmd /c blah" instead (Thanks Michael Sintek!).
Still damn easy. It's not very well tested yet - but it works on my three instances of each OS! If anyone feels like testing it the code is in the aperture cvs repos, FileOpener.java and HttpOpener.java (although it's only just committed so it'll take a while for the sourceforge cvs mirrors to catch up)
[ 2 comments ] ( 44 views ) | permalink |




( 3 / 2065 )Tuesday, March 21, 2006, 07:47 PM
- Everything Else
It wasn't horribly long, but it was full of love! The session timed out or something, and when I hit the preview button I got 403 and when I went back the text was all gone. Bastards. That will teach me to draft the entries in something that isn't firefox... Oh well. I might rewrite it later.
[ 2 comments ] ( 30 views ) | permalink |




( 3 / 4145 )Back Next



