How tanmayvaity/disease-prediction-system works
Project Type and Purpose
• The project is centered around machine learning for disease prediction.
• It includes training multiple models (decision tree, random forest, and gradient boosting), persisting these models, and deploying them for inference (likely via a web interface using Streamlit).
• A Jupyter Notebook is included for exploratory or demonstration purposes.
Main Components
a. Data Layer:
• Dataset: Represent the “dataset” folder containing the training (training_data.csv) and test (test_data.csv) data.
• Data Ingestion/Preprocessing: Indicate that data is read from CSV files to be used in the model training process.
b. Model Training Pipeline:
• Training Script: Include the “train.py” file, which illustrates the process of reading data, preprocessing, training the models using scikit-learn, and evaluating them.
• Configuration Management: Represent “config.yaml” as the configuration component that holds various parameters for training and inference setups.
c. Inference/Serving Layer:
• Web Application: Mark “app.py” as the entry point for the user-facing application. Considering the use of Streamlit, highlight that this component provides the web UI for disease prediction.
• Helper/Runner: “main.py” could be used as an additional executable to manage the overall workflow or integrate multiple components.
d. Analysis & Experimentation:
• Notebook Component: Include “notebook/disease-prediciton.ipynb”, which is likely used for data analysis, experimentation, and visualization of predictions results.
Relationships and Interactions
• Data flows from the Dataset (CSV files) into the Training Pipeline (train.py), where preprocessing and model training occur.
• Trained models are saved into the Model Persistence component (saved_model).
• The Inference Service (app.py) reads configuration parameters from config.yaml and loads the appropriate saved model to serve predictions to the user.
• Optionally, “main.py” may orchestrate these processes or serve as a command-line interface.
• That the Notebook is used for exploratory analysis which may influence model improvements or parameter tuning.
Important Architectural Patterns and Design Principles
• Separation of Concerns: Distinguish between data preprocessing/training, model persistence, and the inference/presentation layer.
• Modular Design: Each script (train.py, app.py, main.py) encapsulates a specific functionality of the system.
• Configurable Behavior: Use the config.yaml file as a single source of truth for various runtime parameters, ensuring flexibility.
• Reusability: The saved models are decoupled from application logic, allowing for independent model updates without affecting the service layer.