Machine Learning to Improve the Accuracy of a Period Prediction App

Machine Learning to Improve the Accuracy of a Period Prediction App

Key Details

Increased period prediction accuracy up to 15%.

  • Challenge
    Improve period prediction accuracy for application users
  • Solution
    Linear and tree-based models to make better predictions of the menstrual cycle
  • Technologies and tools
    Machine Learning: regression and gradient boosting models Scientific (Predictive Analytics Python stack): Python, NumPy, scikit-learn, LightGBM, XGBoost; Web-application: hug (web-framework), Gunicorn (web-server)

Client

The client is a media and entertainment company based in Japan. The company offers various applications to harmonize different client needs around the globe.

The client has developed a predictive analytics app. It’s a period-tracker that offers valuable insights into the menstrual cycle. It aims to track and predict period (next menstruation day, period duration, ovulation day, conception probability) and provides the user with conversation threading.

The client was looking for expertise in machine learning as a service and asked our team to improve the overall prediction accuracy.

Challenge: improve period prediction accuracy for app users

Even with the abundance of period-tracker apps on the mobile app market, women are still struggling to track their periods using prediction apps or having trouble getting pregnant. There might be several reasons for that, but one thing remains the same – the prediction accuracy the modern apps have to offer.

Recently, we have completed a similar project related to menstrual cycle prediction for a famous startup. This project can be a good example of predictive data mining.

Having experience in predictive analytics app development, we were glad to share our expertise with the client and aid them with an accurate and efficient solution.

Our team was challenged to improve the current solution for period predictions without affecting the app performance.

Solution: linear and tree-based models to make better predictions of the menstrual cycle

Knowing that the prediction app has many users, we had to go for a robust solution that would be strong enough to process thousands of user requests per minute. To accomplish this, we decided to use predictive models based on machine learning.

The common approach to predictive app development is to utilize data mining techniques.

Our main task was to predict the number of days remaining until the next menstrual cycle starts on any day of the current cycle. The following information is obtained till the current day of the cycle (previous menstruations logs, user profile info, weight records, temperature records, previous events history, events occurred during the current cycle). All this data was completely anonymized, we had no access to user personal data.

Having all this information in place, we could calculate the next menstruation start date using the following formula: current date + predicted remaining days.

Take a closer look at our approach:

Scheme approach for a project

Our team took raw data, extracted some numerical features. Then we used the features and the calculated target (the number of days left before the cycle starts) to train a model that would be able to predict the same target but for the new users.

Our team has chosen linear predictive models because they are faster to train than other machine learning approaches like neural networks. Moreover, linear models require less RAM. And it’s much easier to implement them both on Server and Application sides.

We proposed a data investigation phase. The main purposes of this phase are to estimate accuracy achievable by machine learning approach, to determine data types valuable for predictions and to select model classes for further modeling.

Results of the proposed phase are:

  • Model prototype for cycle length predictions
  • Model prototype for period length predictions
  • Proof-of-concept report (including evaluation of trained models, their comparison to existing solution)
  • Demo API

Result: data-driven solution for more accurate menstrual cycle prediction

ESSID Solutions, experienced in data mining application development and predictive analysis, has provided the client with a high-capacity solution to significantly improve the accuracy of the period-tracker app.

The client has benefited from cooperation with us in the following aspects:

  • increased period prediction accuracy up to 15%
  • making predicting for women with irregular periods
  • helps the client cope with the wealth of client data more efficiently
  • provided recommendations on how to implement ovulation prediction in the app

Let’s Work on Your Machine Learning Powered Prediction Application