Dogs are our best friends. We rely on them for some very important roles, like livestock herding and emergency services. But just as they always try their best to help us, we also need to do our best to take care of them. Working dogs are highly susceptible to heat stress, so to keep them safe, we created a model for predicting heat stress using some sensor data. The key to our method? Hidden Markov models.


Keeping Dogs Safe with Mathematics

Dogs are more than just our best friends. In addition to bringing happiness and joy to our lives as pets, we rely on dogs to help us with some very important roles, like livestock herding and search and rescue. But just as they always try their best to help us, we also need to do our best to take care of them. That’s why, for my summer project, my supervisor Clara and I explored ways of predicting heat stress in working dogs – so that we can better understand how to deploy them safely.

To be more specific, we wanted to see if we could use the data collected by a temperature-sensing pill to predict whether the dogs were heat-stressed. This is important because working dogs are bred to ignore discomfort, so they don’t show any warning signs of heat stress until it’s life-threatening. However, modelling and predicting heat stress is not as easy as it sounds – different dogs have different fitness levels, and under different environmental conditions, may have completely different thresholds for heat stress.

There is a common saying in statistics, attributed to the statistician George Box – “All models are wrong, but some are useful.” In particular, we do not want to be too restrictive with our model or make it too elaborate. A good model would capture the processes behind how the data was generated, without forcing too many assumptions upon the data.

With Box’s saying in mind, modelling the internal body temperature of an exercising dog may seem like a daunting task, since there appear to be many variables to consider. However, there is a structured way to approach this problem, and that is to consider the data as being generated by a group of underlying behavioural states, let’s say, resting, lightly exercising, and heavily exercising. Temperature readings taken when the dog is resting would probably be lower on average and more stable compared to when the dog is exercising heavily.

Luckily, there exists a neat framework for modelling data that may be generated by underlying states, called the hidden Markov model. It consists of two parts – a hidden state sequence and an observed response sequence. In our case, the underlying behavioural state of the dog forms the hidden state sequence – moving from the resting state to different intensity exercise states throughout the day.

The catch though, is that we may not always be able to determine these underlying behavioural states, for example, if the dog was working independently of their handler. Usefully, however, we can infer these hidden states by measuring a related quantity, like the dog’s internal body temperature, forming our observed response sequence. By comparing the estimated sequence of the dogs’ behavioral states with what they were doing, we were in fact able to detect states that corresponded to high levels of physical exertion – and potentially a higher level of stress as well.

This shows, above all, the beauty of using hidden Markov models: with only light assumptions, we were able to decompose complex time series data into underlying behavioral states, creating simple and easily interpretable models that we believe can be usefully applied to help keep our furry friends safe from heat stress.

Thomas Hanyang Zheng
The University of Sydney

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text.