Skip to content

meoyushi/pcos_predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌸 PCOS Predictor

A simple machine learning app to estimate the risk of Polycystic Ovarian Syndrome (PCOS)


About the Project

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.


Dataset

  • 📍 Source: Polycystic Ovary Syndrome (PCOS) | Kaggle
  • 📄 File used: PCOS_data_without_infertility.xlsxFull_new sheet
  • 🧠 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.


How It Works

  • 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 likely
    • 1 = 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'

How to Run

  1. Clone the repo

    git clone https://github.com/meoyushi/pcos_predictor
    cd pcos_predictor
  2. Install dependencies

    pip install flask pandas scikit-learn numpy openpyxl
  3. Start the app

    python app.py
  4. Open your browser

    http://127.0.0.1:5000
    

App Endpoints

Route Method Purpose
/ GET Main page with input form
/predict POST Makes prediction and returns results
/analysis GET Placeholder for future visualizations

Limitations

  • Model retrains every time the server starts
  • UI is basic and not yet styled for ease of use

About Me

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.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors