Tuesday, July 5, 2011

Ow my eye...

July 5: Finally moving on from my mixture model (maybe)

Today I got up to a kid in the neighbourhood screaming his head off for no apparent reason.  They didn't seem like screams of pain or shock or anything like that; I think he just felt like screaming.  Oh well it was a good time for me to get up, so it worked out alright.  Breakfast this morning was natto and some green vegetable mixture with rice and miso soup and some little siu-mai thingees as well.  It was pretty good, and I'm getting a little more used to natto now, so I can eat it in larger mouthfuls.  I have to be careful to wash my beard well in the shower after I finish eating, because few things make a worse impression than a beard that smells like cheesy feet.  D:<

I got to work on time and set about debugging my mixture model some more.  I mostly didn't change what it was actually doing until much later in the day, but I added a bunch of code to let myself see exactly what was going on wrong.  As it turned out, I was getting "underflow" errors again.  I say "underflow" this time because I was using Kabutoya-san's code as a base, and all the numbers are stored as logarithms of their values, and Kabutoya-san's methods had these nasty little checks for a lower bound that makes sense in his model but not mine, which turned out to be messing everything up royally.  I knew to go talk to him about what might be going wrong when I a) found that some of the probabilities of the latent variables given the users were summing up to 0.0 (rather than 1.0 as a probability must), and b) when I found that my code gave behaviour indicating beautiful asymptotic convergence (and really goddamn fast too!) when I reduced the number of items taken into consideration by a factor of 10.

About when I was going to ask Kabutoya-san he went into a meeting, so I got the chance to try out what I thought was a rather cute way of normalizing a collection of logarithms to try to avoid underflow, but it was either numerically unstable (I didn't think too hard about it) or reliant on what Kabutoya-san demonstrated was the real problem when he came out of his meeting.  With that out of the way (the behaviour of the model is still not that textbook asymptotic convergence, but I'm quite happy to leave it be since Kabutoya-san says it's alright), I moved on to doing performance comparisons between Kabutoya-san's PLSA, my mixture model, user-based collaborative filtering and item-based collaborative filtering.  I'm doing this by a method Kabutoya-san calls "Top N Rate", which is where you see how often you can successfully recommend the last item a user purchases using the knowledge of their purchasing history prior to that one.  I spent the rest of the day working on making my old collaborative filtering code usable with the new requirements I had of it, as well as getting the testing to work on the PLSA and mixture models.

At lunchtime today (sorry, this is a bit out of order haha) I had miso-kasu katsu, which was pretty good.  After eating, Kabutoya-san and co. admitted they aren't very fond of the company cafeteria (they call it a restaurant).  I wholeheartedly agreed with them that the food is not spectacular and that the prices are actually kinda bad (you get way better food at Yoshinoya for less money), but I'm happy the food is edible and that it's not even more expensive than it is.  I like to think that I'm just more tolerant than them, but it's likely they just have more experience with the kind of food the cafeteria serves haha.  I also played some handiball, though it went off to a bit of a rocky start as I managed to jab myself in the eye REALLY HARD with my thumb (I blame the fact that it wasn't beach-style), which left me out of commission with a smarting right eye for like 10 minutes.  >_<  I was getting kinda worried because it was hurting for a long time, but it calmed down and after lunch it wasn't hurting at all anymore, and as of this writing it's still good.  I hope that writing this does not jinx me and make me wake up blind in one eye. D:  My serve (after I ceased doing my best Cyclops impression.  BEHOLD!  OPTIC BLAST!) was pretty good today, and I got my team a lot of free points off of unreturned serves.  I'm still not so great up at the net.  Maybe I will ask next time if I can stay back regardless of my position.  I get to move around more and I think I'm more useful at the back.

At 6pm Kabutoya-san informed me that, since Wednesday is now a day off, Tuesday is the new "refresh day", and so I should leave promptly.  >_<  OK, I was almost ready to do the performance test on the user-based collaborative filtering code but whatever... I went down to the bus stop, and there was a #11 bus for Yokochuu there, and the next #2 for Yokosuka Shimin Byouin ( my bus, 横須賀市民病院 <- I think) wouldn't come for another 25 minutes, so I got on the #11 for Yokochuu with the intention of getting off at Takeyama (武山).  Some of my coworkers were on the bus, and I told them that I was going to get off at Takeyama, and that I was sad that I am forbidden to use a bicycle to get to work (there was an accident involving a student a few years ago), and that I was considering scoping out if I could run to work.  One of my coworkers told me that he used to live in Hayashi dormitory, and that he tried running to work, but it took him 40 minutes and it was too much.  O_O 40 mins would be too much for me too, considering it's almost 30 degrees in the mornings here and it's uphill almost the entire way to work.

Amid all the talking I completely missed Takeyama and had to get off at Kitatake Fsjal (no idea what the latter kanji in the name mean).  I became a bit suspicious of the 40-minute-run estimate, as I was able to walk home in about 20 minutes, and it's maybe 2/3 of the distance to work.  It was downhill, however, rather than up, but I had slacks on and my mysteriously heavy messenger bag as well.

I arrived at about the same time as I would have if I had waited for the #2 bus, and I ate dorm dinner of some kind of baked fish (maybe a herring?  I don't know, but it tasted a touch like a kipper), a DELICIOUS hanpen (pollock-based cake thingey) and vegetable mixture, with miso soup and rice.  I actually had a half decent conversation with Oohashi-san after I asked her what the hanpen was.  She told me what it was, and then commented on the fact that I was the only gaijin that eats natto.  We agreed that it smells really bad, but that it's healthy and the taste is OK.  She asked about where my family is living right now, and if this was my first time in Japan.  She also asked what my father does for work and I got the most amazing reaction when I told her that he's an architect.  It was like I had told her he was the Prince of Wales or something...  She was very nice and used very simple wording and spoke quite slowly (except when she forgot a couple of times haha).  I was really happy that I was able to have a nice chat with her because she seems quite nice, and I'm kind of dependent on her for affordable meals ahahah. >_<

After eating I washed my dishes (all 5 of them haha, 3 cups and 2 2L water jugs) in the bathroom sink that lets you close the drain, and killed a bit of time to digest before going out running.  My run was pretty of tough, as I'm used to neither heat nor hills, but I ended up making it to 通信研究所入口 (the stop before the short, steep hill up to the office), in 17 minutes, two of which were walking (hills man!  Who the hell thought up such a terrible idea!?).  I think if I pace myself a little more comfortably, even if I factor in the hill I can probably make it to work in under half an hour by foot.  I was very happy with this discovery, as I was wondering where I was going to get exercise and what my run route would be.  Also, bus fare is costing me 340円 per day, and I would love to have the extra 10200円 per month to throw around in Akiba hahaha.

Running will probably not result in much of a change in how long it takes me to get to work in the morning, as I usually end up waiting at the bus stop for 10 minutes or so, because my timing in the mornings is not the greatest, and I don't want to go for an ee-han timing and end up late for it (an ee-han timing attack is a type of timing attack in StarCraft where you must deal significant damage during the attack or you will fall very far behind your opponent).  What remains to be seen is if I will be allowed to run to work by Kabutoya-san/company policy (it'd be the latter that'd be the problem I think), if it's logistically sound under proper testing, and if I have the willpower and ability to do it consistently haha.

In other news, I'm unfortunately seeing signs of my becoming an emacs junkie.  Today while typing up this blog I actually encountered two instances where I wanted to use an emacs command, and I have started trying to use emacs commands for things like save and paste (yank in emacs) in other applications. >_<  Oh dear...  Next I'll be coding using butterflies...

I'm going to go to bed now, as my "weekend" begins tomorrow, and I want to be able to make the most of it!   

Caio for now!

No comments:

Post a Comment