Select Page

Predicting appendicitis using machine learning in Mathematica

I note more and more published papers on machine learning.  As a clinician, I find it a fascinating way of looking at patient data.  In case you are not familiar with machine learning, the definition given over at Wikipedia is: Machine learning is the subfield of computer science that gives computers the ability to learn without being explicitly programmed. …machine learning explores the study and construction of algorithms that can learn from and make predictions on data.

That is exactly what machine learning is used for in medicine as well.  In a particular branch of machine learning, called supervised learning, a dataset of predictor variables together with a known outcome variable can be passed to the machine, which in turns constructs a model from the data.  A selection of the data is usually kept separately and is used to test the model.  Given that the outcomes are know, it is trivial to calculate the accuracy of the model.  Once a model is generated, data without a known outcome can be passed to the model, which will predict the outcome.  This can indeed be very useful in medicine.

There are many tools available to do machine learning.  I use both Python and Mathematica.  It is really easy to do.  I have put together a short video on YouTube for those familiar with Mathematica, just to show how easy it is.

YouTube video

In the video I use random forest, logistic regression, and support vector machines models to predict the presence of appendicitis from the simulated modified Alvarado score predictor variables.