How ryanbusby/qc-classification works
This is a Bosch production-line failure-classification pipeline: it clusters sparse measurements by shared non-null features, optionally applies per-cluster PCA, trains and selects classifiers, then predicts failures for test parts. The README documents the stages; src/run.py invokes them in order. Source excerpts show the stages’ data handoffs and persistence. Prediction code has apparent undefined-variable and syntax issues, so the intended runtime flow is represented, but successful execution is not established by the excerpts.
Main entry points: run.py Pipeline runner · clustering.py Cluster datasets · training.py Classifier training · predict.py Test data loading
Components 14
Data preparation
- Pipeline runner
src/run.py - Training data loading
src/clustering.py - Feature clustering
src/clustering.py - Cluster datasets
src/clustering.py
Model development
- Per-cluster PCA
src/pca.py - PCA datasets and maps
src/pca.py - Classifier training
src/training.py - Model selection and persistence
src/training.py
Prediction
- Test data loading
src/predict.py - Row-to-cluster assignment
src/predict.py - Cluster prediction
src/predict.py - Prediction output
src/predict.py
Other components
- Pipeline operator
- Kaggle data
Connections 22
- Pipeline operator → Pipeline runner: starts pipeline
src/run.py - Pipeline runner → Training data loading: runs
src/run.py - Pipeline runner → Feature clustering: runs
src/run.py - Pipeline runner → Per-cluster PCA: runs
src/run.py - Pipeline runner → Classifier training: runs
src/run.py - Pipeline runner → Test data loading: runs
src/run.py - Kaggle data → Training data loading: provides data
src/clustering.py - Training data loading → Feature clustering: supplies measurements
src/clustering.py - Feature clustering → Cluster datasets: writes clusters
src/clustering.py - Cluster datasets → Per-cluster PCA: loads clusters
src/pca.py - Per-cluster PCA → PCA datasets and maps: writes transformed data
src/pca.py - Cluster datasets → Classifier training: loads clusters
src/training.py - PCA datasets and maps → Classifier training: loads PCA data
src/training.py - Classifier training → Model selection and persistence: scores classifiers
src/training.py - Model selection and persistence → Test data loading: persists selected models
- Kaggle data → Test data loading: provides test data
src/predict.py - Test data loading → Row-to-cluster assignment: supplies measurements
src/predict.py - Cluster datasets → Row-to-cluster assignment: provides feature sets
src/predict.py - Row-to-cluster assignment → Cluster prediction: dispatches rows
src/predict.py - Model selection and persistence → Cluster prediction: provides models
- PCA datasets and maps → Cluster prediction: provides PCA maps
src/predict.py - Cluster prediction → Prediction output: writes predictions
src/predict.py