Skip to content

AreTaj/Migraine-Navigator

Repository files navigation

Migraine Navigator

Migraine Navigator is a comprehensive tool designed to help users both track and predict migraine occurrences. By combining detailed logging of migraine episodes with advanced machine learning models, this project empowers users to better understand their migraine patterns and anticipate future episodes.

Features

  • Migraine Tracking: Log migraine events, symptoms, triggers, medications, and weather data.
  • Migraine Prediction: Predict the likelihood of future migraine episodes using state-of-the-art machine learning and ensemble models.
  • Data Visualization: Visualize trends and patterns in your migraine history.
  • Customizable Analysis: Integrate your own data and adjust model parameters for personalized insights.

Requirements

Install dependencies with:

pip install -r requirements.txt

Main dependencies:

  • pandas
  • numpy
  • matplotlib
  • seaborn
  • scikit-learn
  • imbalanced-learn
  • xgboost
  • tensorflow
  • meteostat
  • geocoder
  • pytz

Some models and notebooks require:

  • imbalanced-learn (for SMOTE and ensemble methods)
  • xgboost (for XGBoost models)

Usage

  1. Run the Application: Execute the main.py file to start the application.
python main.py
  1. Input Data: Use the "Input" tab to enter migraine instance details. Click the "Save Entry" button to save the data.

  2. View Entries: Switch to the "View Entries" tab to see the logged entries in a table.

  3. Analyze Data: Go to the "Analysis" tab to perform graphical analysis on the migraine data. Select the type of graph you want to display and click the "Analyze" button.

  4. Predict Migraines: Use the "Prediction" tab to predict the likelihood of a migraine based on the input data and current weather conditions. Click the "Predict" button to see the prediction result.

File Structure

Migraine Navigator/
├── analysis/                # Analysis modules
├── data/                    # Data files (CSV, weather, logs)
├── data_import_helpers/     # Scripts for data import/cleaning
├── dummy_logs/              # Example migraine logs
├── input/                   # Input frame modules
├── models/                  # Saved model files (e.g., .pkl)
├── notebooks/               # Jupyter notebooks for modeling
├── prediction/              # Prediction and ML code
├── screenshots/             # UI screenshots
├── tests/                   # Unit tests
├── view/                    # View frame modules
├── weather/                 # Weather data modules
├── main.py                  # Main application entry point
├── requirements.txt         # Python dependencies
├── README.md                # Project documentation

Screenshots

Input Frame

Input Frame

View Frame

Cannot be shown for reasons of data privacy. View Frame

Analysis Frame

Analysis Frame

Prediction Frame

Prediction Frame

Testing

To run the tests, use the following commad:

python -m unittest discover tests

To run a specific test file, use the following command:

python -m unittest tests.test_input

Modify tests.test_{x} for each file in tests/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Author

This project was created by Aresh Tajvar.

Feel free to reach out if you have any questions or suggestions!

About

Tracks and predicts migraine episodes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published