This is a guest post co-written with Trey Robinson, CTO of Sleepme Inc.
Sleepme is an industry leader in sleep temperature control and management products, including an Internet of Things (IoT) enabled sleep tracking sensor suite equipped with sensors for heart rate, respiratory rate, bed temperature and environment, humidity and pressure.
Sleepme offers a smart mattress system that can be programmed to cool or heat the bed using the companion app. The system can be paired with a sleep tracker that collects information such as heart rate, breathing rate, humidity in the room, wake-up times, and when the user was in and out of bed. At the end of a given sleep session, it will aggregate the sleep tracking data, along with the sleep stage data, to produce a sleep quality score.
This smart mattress works like a thermostat for your bed, giving customers control over their sleep climate. Sleepme products help cool your body temperature, which is linked to falling into a deep sleep, while being warm can make you less likely to fall asleep and stay asleep.
In this post, we share how Sleepme used Amazon SageMaker to develop a machine learning (ML) model proof of concept that recommends temperatures to maximize your sleep score.
“The adoption of AI opens up new avenues to improve the customer sleep experience. These changes will be implemented across the Sleepme product line, allowing the customer to leverage the technical and marketing value of the new features during deployment.
– Trey Robinson, Chief Technology Officer at Sleepme.
Using ML to improve sleep in real time
Sleepme is a science-driven organization that uses scientific studies, international journals and cutting-edge research to bring customers the latest in sleep health and wellness. Sleepme offers information about sleep science on its website.
Sleepme talks about how only 44% of Americans report getting a restful night’s sleep nearly every night and that 35% of adults sleep less than 7 hours a night. Getting a full night’s sleep helps you feel more energized and has proven benefits for your mind, weight and heart. This represents a huge population of people with opportunities to improve their sleep and health.
Sleepme saw an opportunity to improve the sleep of its users by changing the user’s sleep environment during the night. By capturing data from the environment such as temperature and humidity and connecting it with personalized user data such as restlessness, heart rate and sleep cycle, Sleepme determined that they could change the user’s environment to optimize your rest. This use case required an ML model that served for real-time inference.
Sleepme needed a highly available inference model that provided low-latency recommendations. With a focus on delivering new features and products for their customers, Sleepme needed an immediate solution that didn’t require infrastructure management.
To address these challenges, Sleepme turned to Amazon SageMaker.
Using Amazon SageMaker to Build an ML Model to Recommend Sleep Temperature
SageMaker accelerates the deployment of ML workloads by simplifying the ML creation process. It provides a set of ML capabilities that run on a managed infrastructure on AWS. This reduces the operational overhead and complexity associated with ML development.
Sleepme chose SageMaker for the capabilities it offers in model training, the endpoint deployment process, and infrastructure management. The diagram below illustrates its AWS architecture.
Sleepme focuses on providing new products and features for its customers. They did not want to devote their resources to a long process of training the ML model.
SageMaker’s Training model allowed Sleepme to use its historical data to quickly develop a proprietary machine learning model. SageMaker Model Training offers dozens of built-in training algorithms and hundreds of pre-trained models, increasing Sleepme’s agility in model creation. By managing the underlying compute instances, SageMaker Model Training allowed Sleepme to focus on improving model performance.
This ML model needed to make adjustments to the sleep environment in real time. To achieve this, Sleepme used real-time inference from SageMaker to manage the hosting of its model. This endpoint receives data from Sleepme’s smart mattress and sleep tracker to make a real-time sleep temperature recommendation for the user. Additionally, with the option to automatically scale models, SageMaker inference gave Sleepme the option to add or remove instances to meet demand.
SageMaker also provides Sleepme with useful features as your workload evolves. They could use shadow testing to evaluate model performance of new versions before deploying them to clients, SakeMaker Model Registry to manage model versions and automate model deployment, and SageMaker Model Monitoring to monitor their model quality in production These features give Sleepme the opportunity to take its ML use cases to the next level, without developing new capabilities itself.
Using Amazon SageMaker, Sleepme was able to build and deploy a custom ML model in a matter of weeks that identifies the recommended temperature setting, which Sleepme devices reflect to the user’s environment.
Sleepme IoT devices capture sleep data and can now make adjustments to a customer’s bed in minutes. This capability proved to be a business differentiator. Now users’ sleep can be optimized to provide better quality sleep in real time.
To learn more about how you can quickly build ML models, see train models or start using the SageMaker console.
About the Authors
Trey Robinson He has been a mobile and IoT-focused software engineer leading teams as CTO at Sleepme Inc and Director of Engineering at Passport Inc. Over the years, he has worked on dozens of mobile apps, backends and IoT projects. Before moving to Charlotte, North Carolina, Trey grew up in Ninety Six, South Carolina and studied Computer Science at Clemson University.
Benon Boyadjian is a Solutions Architect in the Private Equity group at Amazon Web Services. Benon works directly with private equity firms and their portfolio companies, helping them leverage AWS to achieve business goals and increase business value.
Ikaroa, a full stack tech company, has partnered with its product, Sleepme to use Amazon SageMaker, an automated temperature control system, to ensure users experience the best sleep possible. With automated temperature control, SageMaker can monitor and adjust temperatures in order to maximize sleep quality. It can do this in real-time without requiring any additional effort from the user, making it an ideal solution for those who have difficulty getting comfortable and sleeping soundly.
SageMaker can detect trends in temperature changes throughout the night and act quickly to regulate those changes, allowing users to rest with the confidence of knowing their temperature is being monitored. Furthermore, the system can detect when a user is likely to wake up and adjust accordingly. Finally, the data collected through SageMaker can also be used for analytics, allowing users to track and improve their sleep patterns over time.
Using Amazon SageMaker, Sleepme has been revolutionizing the way users can achieve a comfortable sleep. With automated temperature control, Sleepme can give users the perfect sleeping environment, freeing them from the worries of feeling too hot or too cold in the middle of the night. This ensures the user’s comfort and health, making it easier for them to enjoy a full, deep sleep.
Ultimately, Ikaroa is thrilled to be a part of the collaboration between Sleepme and Amazon SageMaker. We look forward to seeing how this partnership can improve people’s sleep habits and empower them to regain control of their sleep environment.