Wednesday, November 15, 2006

iTunes Automatic Rating, or Why Your Gnarls Barkley Album Mysteriously Has Five Stars

For a long time, I struggled with how to rate my songs in iTunes. I wanted the rating I assigned to a song to sum up my long history of feelings for that song with but a single integer. I wanted to know that I could go to my five-star list for a surefire hit, or prune out some one-star songs when I was getting low on disk space.



But when I was a child, I thought like a child. The problem is, my tastes change. I constantly surprise myself when I repeat a song 3 or 4 times in a row, only to find out it's a mediocre two-star. I also look sheepishly on some of the garbage I rated 5 stars when I was in a weird mood.



It dawned on me that maybe the most accurate, mood-agnostic way to determine my opinion of a song is something I call the play ratio. Specifically, it is the ratio of the number of times I've "played" a song to the number of times I've either "played" or "skipped" it. If I've listened to a song 17 times and never skipped it, the ratio is 1; if I skip it every time it comes up in random mode, it's a 0. If I've listened 6 and skipped 4, it's a 0.6, and so on.