A simple machine learning app to estimate the risk of Polycystic Ovarian Syndrome (PCOS)
Polycystic Ovarian Syndrome (PCOS) is a common hormonal disorder affecting many women, and early diagnosis can significantly improve health outcomes. This project is my attempt to build a basic ML-powered web app that predicts PCOS risk based on patient health metrics.
You enter a few clinical/lifestyle parameters, and the model gives you a prediction along with a risk score—Low, Medium, or High.
Built with Python, Flask, and scikit-learn. Trained on real-world health data from Kaggle.
- 📍 Source: Polycystic Ovary Syndrome (PCOS) | Kaggle
- 📄 File used:
PCOS_data_without_infertility.xlsx→Full_newsheet - 🧠 Features: Age, weight, height, BMI, hormone levels, cycle info, ultrasound results, and more
- 🎯 Target variable:
PCOS (Y/N)
Some unnecessary columns (IDs, unnamed ones) are dropped. Missing values are handled, and BMI is calculated if not available.
-
The app loads the dataset and trains a Random Forest model on launch.
-
User input is collected from a form and preprocessed.
-
The model predicts:
0= No PCOS likely1= Likely PCOS
-
Based on prediction probability, it also returns a risk level:
if prob > 0.7: risk = 'High' elif prob > 0.4: risk = 'Medium' else: risk = 'Low'
-
Clone the repo
git clone https://github.com/meoyushi/pcos_predictor cd pcos_predictor -
Install dependencies
pip install flask pandas scikit-learn numpy openpyxl
-
Start the app
python app.py
-
Open your browser
http://127.0.0.1:5000
| Route | Method | Purpose |
|---|---|---|
/ |
GET | Main page with input form |
/predict |
POST | Makes prediction and returns results |
/analysis |
GET | Placeholder for future visualizations |
- Model retrains every time the server starts
- UI is basic and not yet styled for ease of use
Helloo, I’m Aayushi Thakre, an undergrad at IIITDM Jabalpur with a passion for applying tech to solve meaningful problems—especially in healthcare. This project was a mix of curiosity, learning, and the desire to know more about THIS PARTICULAR condition.