Colorectal cancer survival prediction on Kubeflow
Predicts colorectal cancer patient survival with gradient boosting, tracked in MLflow and run on Kubeflow.
What it does
Patient records are label-encoded, chi-squared feature selection keeps the top five features and the data is split and scaled. A Gradient Boosting classifier is trained and accuracy, precision, recall, F1 and ROC-AUC are logged to MLflow with DagsHub as the remote tracking server. A Flask app serves predictions, and the processing and training steps are containerised, pushed to Docker Hub and run as a Kubeflow pipeline on Minikube.
What was built
- 01
Processing label-encodes features, ranks them with SelectKBest and chi2, and keeps the top five.
- 02
GradientBoostingClassifier (100 estimators, depth 3) trains on scaled data; the scaler is saved with joblib.
- 03
MLflow logs accuracy, precision, recall, F1 and ROC-AUC, using DagsHub as the remote tracking store.
- 04
Kubeflow is installed on a local Minikube cluster and the pipeline image is pulled from Docker Hub.
The pipeline, layer by layer
Four layers, one pipeline.
L1Data
- Patient records CSV
- Chi-squared selection
L2Training
- Gradient Boosting model
- MLflow on DagsHub
L3Orchestration
- Docker Hub image
- Kubeflow pipeline
- Minikube cluster
L4Serving
- Flask prediction app