Summary
Mosaic worked with a vet tech company to develop an encompassing pet wellness score and early disease-identification models using a smart collar data analytics device that collects pet behavioral information and reports health insights to the owner’s app using IoT and sensor data techniques.
Take Our Content to Go
Smart Collar Data Analytics Background
One of the many promises of intelligent devices is to help improve the health & wellness of the wearer. Animals can benefit greatly from these technological advances because they cannot report their feelings to their vet. Pet owners have long sought to provide a high quality of life for their pets yet have lacked the insights to catch subtle behavioral changes that can be early signs of significant health issues. People are spending more on their pets than ever before, and this trend is forecasted to continue well into the future. Innovative enterprises have taken note of this growing sector and invested in vet tech firms to boost their pet offerings.
Mosaic has been working with the Vet Health arm of a global manufacturer for a few years to fill their gap in data science talent and to help protect them from data scientists jumping ship for more lucrative opportunities. With consistent turnover on the data science team supporting the collar development, Mosaic needed to rapidly spin up on current algorithmic efforts to analyze this sensor data for your everyday pet owner to understand.
One of the portfolio companies had developed a smart pet collar to send intelligent information back to an owner’s mobile application. The Vet Health company turned to Mosaic’s Rent a Data Scientist™ engagement program for quick, hands-on access to our diverse team of data scientists with the goal of using machine learning models to extract relevant signals from the accelerometer data and provide deeper insights on pet behavior and health.
Ultimately, the vision for this information would be to develop (1) a comprehensive pet wellness score for a dog based on a range of tracked behaviors (activity, sleep, scratching, etc.) to help owners monitor their pets’ overall well-being on a day-to-day basis and (2) model-based alerts to raise owners’ awareness of changes to their pets’ behavior that might indicate larger chronic or acute health problems.
Integrating Machine Learning Into the Project Roadmap
As a basis for the project, the company relied on a three-tiered model structure comprised of the following:
- A single model that detects specific pet behaviors such as eating, scratching, or self-licking directly from the accelerometer data.
- Models that identify trends and changes in the Tier 1 model behaviors, allowing owners to see, for example, if their pet has been spending more or less time eating than usual.
- Tier 3 models, which use multiple Tier 1 and/or Tier 2 indicators to predict possible veterinary issues and alert owners so that they can seek a veterinary diagnosis and/or treatment.
The full scope of Mosaic’s involvement in the project included building upon this existing multi-class deep time series classification model and wielding advanced algorithms like Neural Net Architectures to provide IoT data science support for the following:
- Derm alert validation: Detecting possible dermatological issues based on measurements of scratching and self-licking and validating detection models against veterinary diagnoses and owner perceptions of dog itchiness.
- Supporting migration of behavior classification and tracking models to an updated version of the branded collar product to ensure continuity of the user experience.
- Mobility prototyping: Leading R&D toward new models to assess a dog’s mobility based on accelerometer signals with the goal of early identification of acute or long-term changes in mobility.
- Sleep wellness index: Developing a component score for the overarching pet wellness index based on sleep behaviors.
Leveraging IoT and sensor movements over time to identify behaviors or system states is a powerful concept that can be achieved through time-series classification (TSC) models. When the goal is to predict the transient state(s) of something or someone constantly monitored by sensors, TSCs are the right tool. In the case of this project, the pet health firm sought to derive insights from data captured by a pet collar device to inform pet owners about the well-being of their furry friend.
In time series classification, the goal is to extract distinct temporal patterns related to a particular event (class). Deep learning is particularly suited for extracting high-level patterns from dense IoT data sets and requires far less pre-processing of input than classical methods. Mosaic also turned to Recurrent Neural Network architectures for their ability to associate different temporal signals across the entire series to an arbitrary level. The strategy of passing sequential information throughout the network, potentially capturing very long and short-term effects, contrasts with Convolutional NNs, which assume that neighboring values in a time course are related.
Machine Learning Execution
For dermatological conditions, the vet health company developed a model to detect possible pet issues based on measurements of scratching and self-licking. They had been running an A/B test of alerts generated from these models, using surveys of pet owners to track relevant veterinary diagnoses, treatments, and owner perceptions of pet itchiness. Mosaic helped provide the formal statistical analysis of the validation test for the alerts and general analysis of the underlying predictive model and offered recommendations for moving the model into production.
Mosaic also helped the company prepare to roll out the latest version of its collar device, which required some modifications to previous models. Their existing time series classification model was developed using training data from the old device. The new device’s accelerometer data would be somewhat different from what was collected by the legacy device. The company had attempted to train a new model that would accurately identify pet behaviors based on the new device’s accelerometer time series, but there was an insufficient amount of annotated training data available for the new device.
Therefore, Mosaic was tapped to explore transfer learning techniques to leverage the information from a large amount of legacy data while tuning to a small amount of new device data. Mosaic consulted the company on transfer learning methodologies, evaluation techniques for the new model, and critical go/no-go decisions for deploying a new model for pets with the new device.
Sleep wellness was another key metric the startup was looking to measure using accelerometer data and a key component of their pet wellness index. Mosaic helped develop a new score for this index based on sleep patterns. Using data from the company’s existing sleep-detection algorithms, Mosaic helped formulate a range of sleep-related features (total daily hours of sleep, frequency of overnight sleep disruption, frequency of daytime naps) that may be correlated with a pet’s overall health and wellness.
Mosaic then developed and tuned algorithms for converting these features into one or more numeric scores representing the health of a pet’s sleep habits relative to other similar pets (inter-dog comparison) and relative to the pet’s own recent history (intra-dog comparison).
Analyzing Pet Mobility
Mosaic also assisted in using the org’s existing data to diagnose potential mobility issues in dogs. This would be the first effort in which, rather than classifying specific short-term behaviors from the accelerometer data, the team would try to identify longer-term health-related trends. Mosaic worked to explore different approaches for representing and assessing pet mobility from accelerometer data, such as by identifying gait asymmetry or changes in how quickly a dog transitions from lying to standing. Based on the insights from the exploratory phase of work, Mosaic then developed an initial prototype for measuring key mobility indicators, tracking them over time, and summarizing information for pet owners.
Determining a Wellness Score from Smart Collar Data Analytics
Mosaic assisted in developing a wellness score to comprehensively capture several aspects of a dogs’ health into one overall numeric value. While not a clinical diagnostic tool, this score would allow pet owners to see at a glance what their dogs’ overall health metrics are saying and if there is cause for concern. Part of this work involved comparing the wellness score across various medical cohorts.
The figure below shows the average wellness score among a healthy control group, a group of dogs diagnosed with dermatological issues, a group with acute mobility injuries, and a group with malaise. The dermatological group has the lowest score, likely brought down by the dogs’ tendencies to scratch and lick more often than a healthy dog. The highest scoring group is the healthy dogs, who are likely not scratching as much, sleeping normally, and getting in good amounts of physical activity.
Going deeper into the individual score components, Mosaic also analyzed how to turn raw metrics into scores. As part of this, Mosaic updated scoring thresholds and created transformations to better capture these metrics for an appropriate level of alerting through the smart collar data analytics.
For example, Mosaic introduced thresholds to the “Drink” score to indicate when the level of drinking may indicate a disorder. In the figures below, the distribution of Drink scores for healthy dogs and diabetic dogs are both shown. The colors indicate the scoring thresholds; when the scores are in yellow or red, there may be an issue. With the updated scoring mechanisms, diabetic dogs are more often in the “alert” zones since they are likely drinking more water throughout the day than a healthy dog.
IoT Data Algorithms Beyond Smart Collar Data Analytics
The project outlined above is a prime example of how IoT and sensor data can improve individuals’ health through consistent monitoring and powerful algorithms that convert these massive data sets into actionable insights. The idea can be extended beyond pet health – showcasing what is possible with intelligent devices for humans and other machines.
IoT wearable devices empower individuals to take control of their personal health by delivering accurate, real-time data on essential health metrics such as heart rate, blood pressure, blood glucose levels, calories burned, etc. Smart health devices have risen in popularity and can be valuable in preventing or diagnosing illnesses. The elements measured by the pet collar in this project offer us insight into how specific IoT sensor data devices can get with monitoring essential aspects of human health and alerting individuals about them.
IoT and sensor data are notoriously massive, but advances in deep learning can help us better make sense of these sets and ultimately deliver detailed, valuable information, which in the case of the vet health company, provides owners with the peace of mind they are providing a healthy life for their beloved pets.