Inspiration

The inspiration for CKD-Predict stemmed from the alarming prevalence of Chronic Kidney Disease and the critical importance of early detection. CKD often progresses silently, with symptoms only appearing in the later stages when treatment options are limited. We recognized the need for a tool that could empower individuals to take control of their health by identifying potential risks early on. Furthermore, we wanted to make this technology accessible to everyone, not just those with access to specialized medical care.

What it does

CKD-Predict is a web application designed to empower individuals to proactively monitor their kidney health. Leveraging the power of machine learning and AI, our platform provides a user-friendly interface for predicting the risk of Chronic Kidney Disease (CKD) based on user-provided lab values. We've integrated secure user accounts and personalized health advice powered by Google's Gemini AI, making preventative care more accessible and actionable.

How we built it

Our project was built in several key stages:

  1. Data Collection and Preprocessing: We started with a dataset of CKD patient information. We cleaned and preprocessed the data, handling missing values and transforming categorical features into numerical representations.
  2. Model Training: We trained several machine learning models, including CatBoost, XGBoost, and Random Forest. We then combined these models into a Voting Classifier ensemble to improve prediction accuracy.
  3. Model Evaluation: We rigorously evaluated our model's performance using appropriate metrics to ensure its reliability.
  4. Web Application Development: We used Streamlit to create a user-friendly web application. Users can input their lab values through interactive forms.
  5. AI Integration: We integrated Google's Gemini AI to provide personalized health precautions. When a prediction is made, the user's data is sent to Gemini, which generates tailored advice.
  6. User Authentication: We implemented a secure login/signup system using SQLite and bcrypt to protect user data.
  7. Deployment: We are working towards deploying the application to make it publicly accessible.

Challenges we ran into

  • Model Selection and Optimization: Choosing the best combination of models for our ensemble was challenging. We had to experiment with different algorithms and hyperparameters to achieve optimal performance.
  • AI Prompt Engineering: Crafting effective prompts for Gemini AI to generate relevant and helpful health advice required careful experimentation and iteration.
  • Data Imbalance: Our initial dataset had some class imbalance, which could have biased our model. We had to address this through techniques like oversampling or undersampling.
  • Ensuring Data Security: Implementing secure user authentication and protecting sensitive health data was a top priority. We had to carefully consider security best practices.
  • Integrating all the components: Integrating the model, the AI, the database, and the web application was a complex task that required careful planning and debugging.
  • Model Input: Ensuring that the user input matched the model's expectations was a challenge. We had to make sure that the user input was transformed in the same way as the training data.

Accomplishments that we're proud of

What we learned

This project was a deep dive into several exciting areas:

  • Ensemble Learning: We gained hands-on experience with ensemble learning techniques, specifically using a Voting Classifier with CatBoost, XGBoost, and Random Forest models. We learned how to combine the strengths of different algorithms to achieve higher accuracy and robustness in our predictions.
  • Data Preprocessing: We learned the importance of data preprocessing, including handling categorical variables, scaling numerical features, and ensuring data consistency. We used a ColumnTransformer to streamline this process.
  • Web Development with Streamlit: We built the entire user interface using Streamlit, which allowed us to rapidly prototype and deploy a functional web application. We learned how to create interactive elements, handle user input, and display results in a clear and engaging way.
  • AI Integration: Integrating Google's Gemini AI was a major learning curve. We explored how to use large language models to generate personalized health advice based on complex medical data.
  • Database Management: We implemented user authentication and data security using SQLite, learning about database design, user management, and password hashing with bcrypt.
  • Model Deployment: We learned how to save and load our trained models using pickle, and how to integrate them into a web application.
  • User Authentication: We learned how to implement user authentication and data security using SQLite, learning about database design, user management, and password hashing with bcrypt.

What's next for CKD Prediction

Integrate with wearable devices for continuous health monitoring. Incorporate AI-based recommendations for lifestyle changes and treatment. Develop multilingual support for wider accessibility.

Built With

Share this project:

Updates