# Why Machine learning in Medicine?

During my clinical career in emergency medicine, I have made the transition to physics graduate, computer programmer and mathematical modeller. Working with doctors and nurses on the front line whilst doing this has given me the insight as to how front line clinicians view certain concepts. There’s a general misunderstanding on what a physics degree entails. When I explain that physics is simply an applied math degree which aims to mathematically model physical systems, it then becomes clear that there is a general misunderstanding between statistics and mathematical modelling.

Let’s start with the difference between statistics and mathematical modelling. Statistics is descriptive. Statistical tests are employed to check is a population sample is representative, if the differences are statistically significant and if the correlations or clusters came about by chance. This is useful but not as powerful as mathematical modelling.

The mathematical modelling concept is simple. Develop an equation that takes an input and makes an accurate prediction. Although the concept is simple there are no standard rules. You have to use your math skills to develop the model. You can use statistics to build your model. Statistical mechanics does. Quantum mechanics exploits probability distributions to develop models. The laws of physics are simply correlations you exploit but your model wouldn’t be complete with just the laws of physics. In my final exams I had to use imaginary numbers, differential equations, symmetry arguments etc with the laws of physics accounting for the correlation between certain variables to come up with a working model of the physical system. If I didn’t I would have failed the exam. It is the mathematical modelling concept of physics that gave rise to the concept: physics envy as the mathematical model gives you power to make strong predictions, change variables and make accurate plans. The testament to this is engineering. All modern electronics relies on the models of quantum mechanics.

So what?? I hear you think. You’re interested in improving clinical outcomes. There are too many variables in healthcare and the laws of physics are not going to help you. This is where machine learning comes in. To illustrate a simple machine learning algorithm let’s look at blood pressure. We then get a massive dataset logging the blood pressure as the output. Each blood pressure reading is paired with variable like age, weight, past med history, lifestyle habits like smoking and many more. Lets say for this example we are logging nine variables. Each data point will be plotted on a 9th dimensional graph (10th if we have a constant). We then hypothesize the line of best fit (our model). We when sum all the distances between the data points and the line of best fit. Adding the sum will give us a 10th dimensional graph. We then take the gradient of the 10th dimensional graph (11th if we have a constant) and get the computer to step in the negative direction and update the variable coefficients. We repeat this algorithm a few thousand times until we get a true line of best fit.

So what does this line of best fit tell us? It tells you to what extent each variable affects the outcome, but most importantly of all it gives you an equation that makes predictions. Due to computing power and the data structures we do not have to limit ourselves to 9 variables. We can have 100s of variables. Our electronic platforms can automatically input the 100s of variables into the model when you open a patient record. We can refine our models with large datasets and we can use different models like cluster analysis and logistic regression.

Machine learning has to power to turn healthcare completely on its head. Machine learning pulls healthcare out of the dark ages and into the mathematical modelling era. We can no longer casually say there are too many variables. You will have to seriously consider if there are too many variables next time as machine learning has made the impossible, possible.

personal mutterings clinical innovation machine learning mathematical modelling measuring clinical outcomes

## maxwellflitton View All →

I help clinicians get to grips with coding and tech, I also code for a financial tech firm

This is they way forward for treatment and developing more effective treatment