How debmalyapal/disease-prediction-system-using-machine-learning works
Project type and purpose
• This is a backend-only machine learning service named “Disease-Prediction-System-using-Machine-Learning.”
• It includes a data folder, a Jupyter notebook for training, a Python Flask application (app.py), and dependency specifications.
• Purpose: train a disease-prediction model on CSV data and expose a REST API for inference.
File structure
• Top-level files:
• Algorithm.txt – likely algorithm description or pseudocode
• CS_8thSem_80.pptx – project presentation
• README.md – project title
• Backend/ directory:
• Data/Testing.csv & Training.csv – labeled datasets for model training and test
• -80 Machine Learning Code.ipynb – notebook with data preprocessing, feature engineering, model training
• app.py – Flask web service loading the trained model and serving prediction endpoints
• requirements.txt – Python dependencies (Flask, pandas, scikit-learn, etc.)
• .flaskenv-sample, .gitignore – environment setup and version control ignores
README for additional insights
• The README only provides the project title, so infer architecture from code and file names.
• The core components are: data ingestion & preprocessing, model training, model artifact storage, and inference API.
Diagramming the architecture
a. Main components:
1. Data Store
– Training Data (Training.csv)
– Test Data (Testing.csv)
2. Training Pipeline
– Jupyter Notebook or training script
– Data preprocessing, feature engineering, model fitting
– Model artifact (e.g., model.pkl or saved model file)
3. Model Repository
– Store serialized model files
4. Inference Service (Flask API)
– app.py loads model at startup
– Exposes /predict endpoint
5. Client or UI (external)
– Could be CLI, Postman, or a web front-end (not in repo)
6. (Optional) Logging/Monitoring
– Log requests and predictions to file or external monitoring service
b. Relationships & interactions:
1. Training Pipeline reads Data Store → produces Model Artifact → pushes to Model Repository
2. Inference Service loads Model Artifact from Model Repository at startup
3. Client sends HTTP request to Inference Service → receives JSON prediction
4. Inference Service may log each request to a logfile or monitoring endpoint
c. Architectural patterns & principles:
– Separation of concerns: training vs. inference
– Stateless API design: each prediction request is independent
– Single responsibility: app.py only handles inference, not training
– Use of environment isolation: requirements.txt and .flaskenv to manage dependencies
d. Key technologies & frameworks:
– Python 3.x
– pandas, numpy for data handling
– scikit-learn (or similar) for ML algorithms
– Jupyter Notebook for exploration/training
– Flask for web API
– CSV files as simple data store