How kactlabs/prettymetrics works
Pretty Metrics is a Python library for fitting many classification or regression algorithms to supplied train/test data and comparing their scores. The principal workflow is to pass the split data to the appropriate API, which preprocesses features, trains and evaluates candidate models, and returns a ranked metrics table with optional predictions and fitted models. The README documents both task types. The separate Streamlit demo adds CSV upload, regression comparison, plots, and downloads. The model internals are represented at module level because the excerpts omit portions of both fit implementations.
Main entry points: reg.py Regressor · app.py Streamlit comparison app · clf.py Classifier
Components 15
Classification
- Classifier
prettymetrics/clf.py - Feature preprocessing
prettymetrics/clf.py - Classifier candidates
prettymetrics/clf.py - Classification scores
prettymetrics/clf.py
Regression
- Regressor
prettymetrics/reg.py - Feature preprocessing
prettymetrics/reg.py - Regressor candidates
prettymetrics/reg.py - Regression scores
prettymetrics/reg.py
Streamlit Demo
- Streamlit comparison app
app/app.py - Tables, plots, downloads
app/app.py
Other components
- Python caller
- Scikit-learn
- XGBoost / LightGBM
- Demo user
- Uploaded CSV
Connections 18
- Python caller → Classifier: supplies split data
- Python caller → Regressor: supplies split data
- Classifier → Feature preprocessing: preprocesses features
- Classifier → Classifier candidates: fits candidates
- Classifier candidates → Scikit-learn: uses estimators
- Classifier candidates → XGBoost / LightGBM: uses optional estimators
- Classifier → Classification scores: returns scores
- Regressor → Feature preprocessing: preprocesses features
- Regressor → Regressor candidates: fits candidates
- Regressor candidates → Scikit-learn: uses estimators
- Regressor candidates → XGBoost / LightGBM: uses optional estimators
- Regressor → Regression scores: returns scores
- Demo user → Streamlit comparison app: uses app
- Demo user → Uploaded CSV: uploads data
- Streamlit comparison app → Regressor: calls fit
- Uploaded CSV → Streamlit comparison app: provides rows
- Streamlit comparison app → Tables, plots, downloads: renders and downloads
- Regressor → Streamlit comparison app: returns metrics