Objective
Accurate tracking of menstrual cycles is essential for women’s health, impacting everything from family planning to fertility monitoring. Bellabeat is revolutionizing this space with advanced machine learning algorithms capable of predicting period start dates and ovulation timing far more accurately than traditional methods. Harnessing deep learning and analyzing historical cycle data, Bellabeat’s models significantly reduce errors in predictions—like halving the expected duration for period end dates. These innovations empower women to understand their bodies better and make informed health choices.
Introduction
Period Ovulation Tracking: Advanced Menstrual Tracking Algorithms Predicting a woman’s menstrual cycle, including the start of her period, the length of her cycle, and the timing of ovulation, has significant applications in both healthcare and personal wellness. Accurate predictions can aid in family planning, fertility monitoring, and understanding individual health patterns. For many years, these predictions were based on simple averages or calendar methods. However, as data science and machine learning have evolved, more sophisticated approaches have emerged, enabling precise forecasting using diverse data sources and advanced algorithms.
At Bellabeat, we are developing advanced machine learning (ML) models, particularly deep learning, to predict menstrual cycle events using a menstrual cycle tracking app. By leveraging large amounts of historical data, these models can offer personalized predictions based on an individual’s unique cycle characteristics. The complexity and variety of factors influencing a woman’s cycle, such as hormonal changes, lifestyle, and health conditions, make this task challenging but highly valuable [1].
The Importance of Period and Ovulation Prediction
The menstrual cycle is a biological process that plays a crucial role in women’s health. It involves the preparation of the uterus for pregnancy and is marked by regular cycles of hormonal fluctuations. Ovulation, the release of an egg from the ovaries, typically occurs around the middle of the menstrual cycle, and accurate predictions of ovulation time are important for both fertility and contraception planning.
Predicting a woman’s period start date is one of the key goals of these menstrual tracking algorithms,as menstrual cycles vary from person to person, with some women having cycles that are shorter or longer than the typical 28-day cycle. This variability becomes even more pronounced for women with irregular cycles. Factors such as stress, hormonal imbalances, underlying medical conditions, or lifestyle changes can disrupt cycle regularity, making accurate predictions particularly challenging.
Understanding the timing of ovulation is crucial for women who are trying to conceive or avoid pregnancy, in addition to predicting their menstrual cycle. The next cycle, or day one of your next period, is expected 14 days after ovulation, but the total length of the cycle can vary significantly from cycle to cycle, especially and primarily during the follicular phase, or first half of the cycle. To make accurate predictions, it is important to consider historical cycle data, lifestyle changes, and other relevant factors.
Overview of the Algorithms Used
To achieve accurate period and ovulation predictions, we at Bellabeat use period tracking algorithms powered by machine learning that process a vast amount of data, including cycle history, physiological data, and lifestyle factors. Our models utilize deep learning architectures, primarily transformer-based models [2], which are renowned for their ability to handle sequential and time-series data efficiently. Transformers have been widely adopted across various fields due to their exceptional performance in modeling sequential dependencies, and they form the backbone of large language models (LLMs) such as OpenAI’s GPT series, which powers advanced natural language processing systems. This versatility and proven success in analyzing complex patterns make transformers an ideal choice for menstrual cycle prediction tasks.
In particular, the models employ an encoder-decoder framework where an encoder processes the input sequence of features (representing historical cycle data and various other signals), and the decoder predicts the future events, such as period start, ovulation, and cycle length. The model is designed to handle multiple outputs for different predictions.
Transformers excel in capturing long-range dependencies in sequences, making them ideal for predicting menstrual cycle events, where earlier cycle data (e.g., the first day of menstruation) impacts later predictions (e.g., the next period or ovulation date). For women with irregular cycles, these dependencies can be even more nuanced, and the ability of transformers to analyze extensive and diverse datasets helps mitigate inaccuracies in prediction.
The models are trained in a multi-task learning fashion, meaning they are designed to predict multiple outputs simultaneously. The tasks include:
- Predicting when the next period will start.
- Estimating the number of days until ovulation.
- Determining the likelihood of ovulation occurring (i.e., whether the cycle is ovulatory or anovulatory).
- Predicting the length of the period.
Multi-task learning helps the model to capture the relationships between these events, improving the accuracy of predictions for each individual task.
Data Used
The data utilised in these models typically consists of a wide range of information related to a woman’s cycle and overall health. The input features include:
- Cycle history: Dates of previous menstrual periods, including the first day of menstruation, the last day of menstruation, and ovulation dates.
- Health data: Information about physical symptoms (e.g., fatigue, cramps), mood changes, lifestyle (e.g., diet, exercise), and medications.
- Physiological markers: Resting heart rate, cardiac coherence, respiratory rate, skin temperature
Results
Our analysis demonstrates that ML models outperform traditional median-based algorithms in every key metric:
- For predicting the start of a period, ML achieved a mean absolute error (MAE) of 2.3 ± 0.03 days, compared to 2.92 ± 0.03 days with the median algorithm.
- For predicting late cycles, ML’s MAE was 3.0 ± 0.1 days, while the median algorithm had 3.2 ± 0.1 days.
- When predicting when a period ends, ML achieved a remarkable MAE of 0.68 ± 0.02 days, nearly halving the error of the median algorithm (1.12 ± 0.02 days).
- In determining whether a cycle is ovulatory, ML achieved an F1 score of 0.922 ± 0.001, compared to the median algorithm’s 0.900 ± 0.001.

While the current results are based on menstrual cycle and health tracking data, our ongoing research focuses on the potential of physiological data to enhance predictions. Parameters such as skin temperature, cardiac coherence, respiratory rate, and resting heart rate are known to fluctuate with hormonal changes during the menstrual cycle. Integrating these signals into ML models could provide a more holistic view of cycle dynamics, leading to even greater prediction accuracy.
For instance:
- Skin Temperature: Subtle increases during ovulation may help improve the prediction of fertile windows.
- Resting Heart Rate and Respiratory Rate: Hormonal shifts during different phases of the cycle influence these metrics, offering valuable signals for prediction.
- Cardiac Coherence: Changes in the balance of the autonomic nervous system, reflected in heart rate variability, could be another key indicator.
Conclusion
Menstrual cycle prediction is critical for women’s health, affecting everything from daily planning to medical care. While traditional algorithms like the median approach have served as a starting point, machine learning offers a leap forward in accuracy and personalization in period and ovulation predictions. Our work at Bellabeat demonstrates the potential of machine learning in menstrual tracking apps, as well as women’s health apps to outperform traditional methods and points toward an even brighter future with the inclusion of physiological data.
By implementing and embracing these technological advancements in Bellabeat products, we are not just improving predictions; we are empowering women with better tools to understand and manage their health. With digital products such as a period tracking app, women can benefit from accurate estimates on period and ovulation predictions and more reliable family planning. Adding physiological data will improve the prediction of menstrual cycle events, we anticipate. Ultimately, our goal is to provide a comprehensive reproductive health tracking solution that supports women in making informed decisions about their health and well-being.
Literature
- Li, K., Urteaga, I., Shea, A., Vitzthum, V. J., Wiggins, C. H., & Elhadad, N. (2022). A predictive model for next cycle start date that accounts for adherence in menstrual self-tracking. Journal of the American Medical Informatics Association, 29(1), 3–11.
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention Is All You Need.

