Yahoo KDD Cup



In a few days starts the Yahoo KDD Cup, i'll participate in this one.  It is an interesting task where the rate of users has to be predicted.  The prediction task is based on previous users behaviour, finding patterns and common music/artists/genre and profiling new customers based on the music they do like.  I hope i have fun during this competition and keep learning from these experiences.

If possible, i would keep doing all my mining/machine learning scripts in perl, so i will share the solutions for the problems i had to face during this experience.

I wanted to search an id inside an array, to do this i did:

open TODO, "todo" or die $!;
my @todo = ;
close TODO;
@array = ();
foreach (@todo) {
   my ($id, $type) = split(/\t/);
   chop ($type);
   $array[$id] = $type;
}
my ($id, $rank, $day, $time) = split(/\t/, $linea);