Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Blockchain-ML medical health .ipynb #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TushtiSavarn
Copy link
Contributor

here's a brief description of the code:

Import Libraries: The necessary libraries such as pandas, scikit-learn, XGBoost, and Kaggle API are imported. Blockchain Class: Defines a simple blockchain class to store medical reports. Download Data Function: Downloads the dataset from Kaggle using the Kaggle API and unzips it. Load and Prepare Data Function: Reads the downloaded CSV file, preprocesses it by dropping irrelevant columns, encoding categorical variables, and processing the 'Blood Pressure' column. Train Model Function: Splits the data into training and testing sets, scales the features, and trains a voting classifier ensemble using Random Forest and XGBoost classifiers. Predict Stress Level Function: Predicts the stress level based on the user input using the trained model. Get Diagnosis Function: Provides a diagnosis based on the predicted stress level. Get User Input Function: Takes user input for various health parameters. Main Execution:
Downloads the dataset.
Loads and prepares the data.
Trains the model.
Takes user input for health parameters.
Predicts stress level and provides a diagnosis.
Creates a blockchain instance, adds the medical report to it, and retrieves reports based on a user-provided key. This code essentially demonstrates how to build a simple system for predicting stress levels based on health parameters, providing a diagnosis, and storing medical reports securely using blockchain technology.

here's a brief description of the code:

Import Libraries: The necessary libraries such as pandas, scikit-learn, XGBoost, and Kaggle API are imported.
Blockchain Class: Defines a simple blockchain class to store medical reports.
Download Data Function: Downloads the dataset from Kaggle using the Kaggle API and unzips it.
Load and Prepare Data Function: Reads the downloaded CSV file, preprocesses it by dropping irrelevant columns, encoding categorical variables, and processing the 'Blood Pressure' column.
Train Model Function: Splits the data into training and testing sets, scales the features, and trains a voting classifier ensemble using Random Forest and XGBoost classifiers.
Predict Stress Level Function: Predicts the stress level based on the user input using the trained model.
Get Diagnosis Function: Provides a diagnosis based on the predicted stress level.
Get User Input Function: Takes user input for various health parameters.
Main Execution:
Downloads the dataset.
Loads and prepares the data.
Trains the model.
Takes user input for health parameters.
Predicts stress level and provides a diagnosis.
Creates a blockchain instance, adds the medical report to it, and retrieves reports based on a user-provided key.
This code essentially demonstrates how to build a simple system for predicting stress levels based on health parameters, providing a diagnosis, and storing medical reports securely using blockchain technology.
@Atharv714 Atharv714 added level2 gssoc Associated with GSSOC labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc Associated with GSSOC level2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants