Predicting HIV Progression
About a month ago I came across Kaggle which provides a platform for prediction competitions. It's an interesting concept. Accurate predictions are very useful but designing systems to make such predictions is challenging. By engaging the public it's hoped that talent not normally available to the competition organiser will have a try at the problem and come up with a model which is superior to previous efforts.
Prediction is not exactly my area of expertise but I wanted to have a crack at one of the competitions currently running; predicting response to treatment in HIV patients. I haven't yet started developing a model but wanted to release the python framework I've put together to test ideas. It can be downloaded here.
I've included a number of demonstration prediction methods; randomly guessing, assuming all will respond or assuming none will respond. I suggest you start with one of these methods and then improve on it with your own attempt. The random method was my first submission which, at the time of writing, currently puts me in 30th position out of 33 teams. Improving on that shouldn't be difficult.
The usage of the framework isn't difficult.
>>> import bootstrap >>> boot = bootstrap.Bootstrap("method_rand") >>> boot.run(50) Mean score: 0.501801084135 Standard deviation: 0.0241816159815 Maximum: 0.544554455446 Minimum: 0.442386831276 >>>
During development you can use the bootstrap class to get an idea of how well your method works as demonstrated above. All the training data is split randomly into training and testing sets and then the method trained on the training set and assessed on the test set. This process is repeated, the default is 50 times, and the the scores returned. The score returned will be different to the score when you submit but hopefully should give you an indication of how well you're doing.
>>> import submission >>> sub = submission.Submission("method_rand") >>> sub.run("submission1.csv") >>>
When you are satisfied with your method you can create the file needed for submission using the above code. In this case we are sticking with the random method. The submission file is submission1.csv. Hopefully this code is useful to you and you'll submit a prediction method yourself.
Johnathan, I'm glad to see a Python quickstart package. Python is my language of choice for most applications. I'm in the process of prepping for my PhD thesis defense on June 1st so my time is pretty limited. I'll try to post a review/suggestions sometime next week. Have you thought about putting it up on github/bitbucket, etc? I always imagined that it would be a good way to work with a team of people continually improving the code. Anyways, Good Luck! Will