This week we
made a few changes to the setup of the project. We decided to
let JUNG deal with the specifics of clustering, learning and such,
but let Prefuse deal with the visualization of the resulting graphs.
I wanted to see how easy it was to set up a graph in JUNG, and
it was surprisingly simple! All you had to do was input the graph,
get a graphDraw, and create a frame. I was extremely surprised.
My first program was no more than 3/4 of a page with a simple
data set.
Since I knew
that we were going to use k-means for clustering, I decided to
test out JUNG's algorithm for that, and to further my understanding
of it as well. It did not come as a surprise to me that I ran
into problems from the start, even with my success with graph
drawing. I had to research different interfaces with which I was
unfamiliar, and to figure out how to convert sets into arrays
into maps and such. I probably spent at least two days feeling
like I was banging my head against a brick wall. I always knew
that I was good at creating infinite loops, but this time, instead
of creating a program with infinite loops, I created one in myself!
I kept going over the same details, clicking on links in the API
which kept referring me back to the page to which I had just been.
The worst part was that I knew that this was happening, yet I
could not break the cycle.
In an immense
burst of self control, I quit all my emacs windows, terminals
and browsers. I spent the rest of the day doing something else
entirely, such as making sketches of how I thought the program
would develop. That did the trick! I came back the next day with
a clear head and successfully implemented the k-means algorithm
and was able to extract the results from those stubborn sets.
And what made it all the more irritating was the fact that it
took two for loops to do it all. I felt the same way that I did
when I was in my data structures class and had written two or
three pages worth of code just to realize hours later that all
I needed was two lines (recursion will get you every time).
In Other News:
Eric took me to the store and I went on a major shopping expedition!
I got so much stuff and now have food besides instant oatmeal
and cheese sandwiches. It's funny what you will get excited about
when you have been doing nothing but working and sleeping. That's
probably it for right now. I'm looking forward to next week when
we start the actual project...all of this has been working up
to the real thing!