We recently launched the Onoco Optimal Nap Time Predictor, powered by Onoco AI - but what exactly does that mean?
Onoco AI is a forecasting engine based on neural networks that predicts a baby's personalised wake window.
We use anonymised data, meticulously collected by our users, to train and optimise the algorithm. At the moment we are primarily focusing on naps history and baby’s age but we plan to incorporate other event types in the future iterations of Onoco AI to see how they impact children’s sleep.
The model has been trained on more than 1,500,000 naps collected over more than 2 years. It has been designed and trained to work on children younger than 1 year.
Why is it useful for parents to know a predicted optimal nap time?
1. Better sleep quality: Nap time plays a crucial role in a baby's sleep quality and overall health. A nap at the right time can help a baby feel more rested, alert, and attentive (Mindell et al., 2015). By knowing the predicted optimal nap time, parents can ensure that their baby gets enough rest and sleep, leading to better overall sleep quality.
2. Improved mood and behaviour: Lack of sleep can lead to irritability, crankiness, and tantrums in babies, which can be stressful for parents (Sadeh et al., 2002). By ensuring that their baby gets a nap at the optimal time, parents can help their baby feel more rested, which can lead to improved mood and behaviour.
3. Increased productivity: For parents, knowing the optimal nap time for their baby can also help them plan their day more efficiently. If a baby takes a nap at the right time, parents can use that time to get other tasks done or take a break themselves, leading to increased productivity and reduced stress (Belsky & Kelly, 1994).
4. Consistency: Establishing a consistent nap routine can help babies develop healthy sleep habits that they can carry into childhood and beyond (Mindell et al., 2006). By knowing the optimal nap time, parents can work towards establishing a consistent nap routine, which can benefit their baby's overall health and well-being.
Why aren't well-known wake windows good enough?
Every baby is unique and may have different sleep needs. For example, some children may need longer naps than others or may need a shorter wake window before their first nap. Using a one-size-fits-all approach does not take these individual differences into account and can lead to ineffective sleep schedules for some children.
When we looked into the data it became quite clear that the wake windows of many children fall outside of the standard ‘wake window’ timeframe:
Predicting a baby's personalised wake window is a challenging task...
The task of predicting a baby's sleep patterns is understandable a challenging task!
Every baby is unique, and sleep patterns can vary widely, making it challenging to find enough data to train a robust model.
Non-stationarity: A baby's sleep pattern is subject to change as they grow, making it difficult to predict what their sleep schedule will be like over time. Moreover, there are a lot of factors that can influence a baby's sleep patterns, such as feeding habits, environment, or the presence of noise or light.
High Variability: There is a lot of variability in babies' sleep patterns, even within the same age range. This can make it difficult to establish a universal sleep pattern for all babies, and models that work well for some babies may not work well for others.
Data quality: Incomplete or inaccurate data can lead to over-fitting or under-fitting of the model, which can result in poor performance and inaccurate predictions. Parents may forget to input data into the app or round up sleep times.
Seasonality: There is some evidence to suggest that there may be seasonality in a baby's sleep patterns. Several factors such as temperature, humidity, and light exposure can change with the seasons, which may affect a baby's sleep quality and duration. For example, during the summer months, longer days and increased light exposure may lead to delayed bedtimes, while during the winter months, shorter days and reduced light exposure may lead to earlier bedtimes.
To create a model able to predict children’s sleep patterns and generate personalised wake windows, we took the following steps over the course of 12 months.
Data Collection: The first step in developing a model for predicting a baby's sleep pattern is to collect data on their sleep habits. Onoco has been publicly available to parents since October 2020. We decided to use 1,500,000 sleep times logged by our users for children younger than 1 year.
Feature Engineering: Once data was collected, the next step was to extract relevant variables that can be used for modelling. Data we have taken into consideration include several different features, including the time the baby falls asleep, the duration of sleep, the time the baby wakes up, the baby’s age, the timezone, gender, family size, etc.
Modelling: After feature engineering, a model was trained to predict the baby's personalised wake window. We approached the problem from several different angles and tested multiple different hypotheses. In the end, a multi-layer neural network has proven to be the most effective solution in terms of the accuracy of the predictions.
Evaluation: The final step is to evaluate the model's performance on a validation set. This was done using various metrics, such as mean absolute error (MAE) and mean squared error (MSE). We have run 3 phases of tests with real Onoco families who got access to our algorithm before the public release. The results were very positive and user feedback allowed us to address a few UX issues. The vast majority of predictions fell within +/- 30mins from the actual nap time recorded by the users. In the last phase of testing, 83.3% of responders said that they would recommend Onoco Premium and the Optimal Nap Time Predictor tool to other families like theirs.
At our company, we take user data privacy and app security very seriously. We want to assure all users that the data we collect is anonymised and treated with the utmost care and respect for their privacy. Our model has been developed using completely anonymised data that does not contain any personally identifiable information. We are compliant with GDPR regulations, and we do not share any personally identifiable information with any third parties.
What is a neural network?
Just like a human brain, a neural network is composed of a large number of neurons that detect patterns in the data. A 'neuron' in a neural network is simply a mathematical function that takes an input, multiplies it by the weight and then passes the result to other neurons.
Will Onoco AI model be improved over time? How can I help to make it even better?
It’s a long journey. We are really excited and very optimistic after seeing the first results - but we want to emphasize that this is just the beginning. Our model is designed to learn and improve over time. The more data we gather, the more accurate our predictions will become.
We invite all parents to use our model and provide feedback based on their experience. Your input will help us improve the algorithm and provide even more accurate predictions in the future. Together, we can help babies get the restful sleep they need to thrive.
Mindell, J. A., Kuhn, B., Lewin, D. S., Meltzer, L. J., & Sadeh, A. (2015). Behavioural treatment of bedtime problems and night wakings in infants and young children. Sleep, 28(10), 1263-1276. https://pubmed.ncbi.nlm.nih.gov/17068979
Sadeh, A., Mindell, J. A., Luedtke, K., & Wiegand, B. (2009). Sleep and sleep ecology in the first 3 years: a web-based study. Journal of Sleep Research, 18(1), 60-73. https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1365-2869.2008.00699.x
Belsky, J., & Kelly, J. (1994). The transition to parenthood: How a first child changes a marriage: Why some couples grow closer and others apart. New York: Delacorte Press. https://www.abebooks.co.uk/9780385306164/Transition-Parenthood-First-Child-Marriage-0385306164/plp
Mindell, J. A., Telofski, L. S., Wiegand, B., & Kurtz, E. S. (2009). A nightly bedtime routine: impact on sleep in young children and maternal mood. Sleep, 32(5), 599-606. https://academic.oup.com/sleep/article/32/5/599/2454312