How bharathmrr/mlops-complte-on-medical-insurance-cost-dataset works
This repository is a medical-insurance-charge regression application with a Flask prediction interface and a manually runnable data-to-model workflow. The code shows ingestion and splitting, feature transformation, random-forest training, evaluation, and serving; the README additionally describes DVC versioning and MLflow tracking, but those implementation files are absent from the tree. The documented FastAPI, CI/CD, and infrastructure claims do not match the sampled Flask code or available paths, so they are not represented as implemented components.
Main entry points: model_evalaution.py Model evaluation · app.py Flask prediction API · transform Transformed data · random_forest_model.pkl Trained model
Components 13
Data preparation
- Insurance data
data/insurance.csv - Load and split
src/data_ingestion.py - Split datasets
data/processed - Feature transform
src/data_preprocessing.py - Transformed data
data/transform
Model lifecycle
- Random forest training
src/model_training.py - Trained model
models/random_forest_model.pkl - Model evaluation
src/model_evalaution.py - Evaluation metrics
reports/evaluation
Prediction serving
- Prediction interface
templates/index.html - Flask prediction API
app.py
Other components
- Prediction user
- Web client
Connections 13
- Load and split → Insurance data: reads
src/data_ingestion.py - Load and split → Split datasets: writes split
src/data_ingestion.py - Feature transform → Split datasets: reads
src/data_preprocessing.py - Feature transform → Transformed data: writes transformed
src/data_preprocessing.py - Random forest training → Transformed data: reads
src/model_training.py - Random forest training → Trained model: saves
src/model_training.py - Model evaluation → Trained model: loads
src/model_evalaution.py - Model evaluation → Transformed data: reads test data
src/model_evalaution.py - Model evaluation → Evaluation metrics: writes metrics
src/model_evalaution.py - Web client → Prediction interface: opens
- Prediction interface → Flask prediction API: submits prediction
- Prediction user → Flask prediction API: requests prediction
app.py - Flask prediction API → Trained model: loads for prediction
app.py