This script generates a dataset of random values within a specific range for each input. This dataset may not be accurate for real-world applications and should only be used for testing purposes.
This program is a simulation of a case-based reasoning (CBR) system for diabetes management. It uses a specified algorithm to determine the recommended insulin bolus for a new case based on the similarity to existing cases in a database.
- Clone or download the repository
- Import the necessary requirements
pip install -r requirements.txt
- Start the backend server using Python 3
sudo python3 db.py
- Generate a testing dataset (optional)
sudo python3 generator.py
- Run the program using Python 3
sudo python3 diabetes_cbr.py
- Choose what algorithm and metric should be used in the db.py file
- The program will then retrieve the keys and use the selected algorithm and metric to determine the recommended insulin bolus for the new case based on the similarity to existing cases in the database
- The recommended insulin bolus will be displayed on the screen
- Preprandial Blood Glucose (BG) – [50-250] mg/dL
- IOB – [0-1] U
- BG Target – 100 or 110 mg/dL
- Carbohydrates Amount (CHO) – [25-80] g
- Patient weight – [50-140] kg
- ICR – [8-23]
- ISF – [25-55]
- Physical activity preprandial:
- Duration- [0 - 100] min
- Heart rate- [40-110] bpm or intensity [0-6]
- Physical activity postprandial:
- Duration- [0 - 100] min
- Intensity- [0-6]
- Day time - (hh:mm)
- Recommended Insulin Bolus- [0-12] U