Leveraging Machine Learning for Better Patient Treatment
Leveraging Machine Learning for Better Patient Treatment
by Josh Holmes, Partner Catalyst Team
Customer Background
Medilync was founded with the goal of revolutionizing the way diabetes is managed and treated in a value-based care landscape. This approach centers on understanding the patient and being able to make recommendations about various lifestyle choices.
To accomplish this, Medilync is creating an all-in-one telehealth device, called Insulync. Composed of a glucose meter and insulin pen reader, Insulync enables doctors with the ability to interact with patients in a more impactful way, leveraging near-real time analysis of data feeds on blood sugar levels, insulin dosage, heart rate, and blood pressure. Simultaneously, data collected via the device will be combined with meal plan information from partners such as My Fitness Pal and exercise information. All of that data is then analyzed via machine learning to help understand and identify the best care for a patient.
The Problem
The initial version of the solution used a virtualized cluster environment running Hadoop on Linux, with machine learning done using Apache Mahout - a set of machine learning tools that deal with classification, clustering, recommendations, and other algorithms. Setting up and maintaining the Apache Mahout cluster had been difficult and time consuming. Additionally, Medilync needed a management interface for the cluster with provisioning scripts to get better insight about what was running on the cluster.
The ultimate goal was to do real-time analysis on the patient behavioral data that would enable the care provider to give feedback to the patient to help them improve their quality of life.
Overview of the Solution
In January 2015, Medilync developers spent several days with engineers from Microsoft’s Technology Evangelism and Development (TED) team. TED and Medilync engineers created an innovative solution that utilized Azure Machine Learning, Azure Event Hubs and Nitrogen (an IOT reference architecture implementation).
Medilync worked hard to fine tune their machine learning models using Mahout. When they moved their models to Azure ML Studio, Azure ML Studio enabled verification of each step of the process, from the earliest stages of training the model. This dramatically reduced the time to recreate and verify the models. Azure ML Studio also allows for running more than one model at a time, allowing Medilync to quickly and efficiently determine which models are most accurate by contrasting and comparing results.
To get started, AzureML Studio has a drag and drop interface to build up your experiments. Since Medilync has more than one data source, they started with more than one reader and then processed that input with their existing R scripts to get clean their data for the ML processing. Then they were able to quickly join the data using Azure ML Studio’s Join to merge the two datasets, delete columns that they didn’t want using the Project Columns feature and finally add metadata about each of the fields to enable more efficient processing.
At this point, they have the data ready to run through the model. AzureML Studio makes it trivial to split data and choose a model to run. The Sweep Parameters will run through the parameters trying a number of different combinations of parameters looking for the most optimal set to consider. All you have to do is figure out which column(s) you want to predict. Then the scoring of a model is simply looking at the remainder of the data that you didn’t already use to train the model in the first place.
Since it’s so easy to run an experiment, the next step was to compare and contrast a number of different types of models against the data to see which was the most accurate and useful. While the below picture looks complicated, it’s really just an expansion of the earlier models.
Once the model has been trained, the Azure ML Studio allows you to publish the model as a web service hosted in Azure Web Sites. This web service made it easy to incorporate the model into Medilync’s product by simply making a REST call passing in the data that they want to evaluate.
By leveraging Azure Machine Learning, Medilync was able to eliminate the time and energy required to maintain their environment and focus that time on product development. When combined with the increased rate at which changes to their model could be verified, it enabled them to move the value of their solution ahead more quickly while also helping reduce related overhead costs.
There were a number of things that they discovered with their use of Azure Machine Learning. For example, it became clear after watching sleep patterns with the Microsoft Band and analyzing the correlation with the blood glucose levels that people with higher glucose levels had poor sleep patterns which is caused by increased nighttime kidney function.
More Information
Machine Learning: https://azure.microsoft.com/en-us/documentation/services/machine-learning/
Event Hub: https://azure.microsoft.com/en-us/documentation/services/service-bus/
Hortonworks: https://hortonworks.com/
Nitrogen: https://nitrogen.io/
Opportunities for Reuse
While the code that Medilync created for their project is proprietary, Azure Machine Learning offers many examples and demos how to solve different kind of problems and can easily be applied to many machine learning scenarios.
Josh Holmes is a passionate soul who gets his kicks solving problems with deep fried awesomeness. He is the Director of Architecture in the Partner Catalyst Team.