How felipesidooski/creditscore works
This repository is a credit-default modeling project, with a reusable champion-model training and inference path alongside historical experiments. The principal user workflow loads raw client rows, applies deterministic preprocessing and feature engineering, scores them with a saved model artifact, and writes predictions. The README documents additional exploration, validation, resampling, ensembling, feature selection, tuning, stacking, and calibration capabilities. Some experimental implementations are unsampled; their relationships are included only where README statements or indexed imports support them.
Main entry points: credit_score_experiments_full.py Historical experiment engine · training.py Champion trainer · inference.py Risk predictor · eda.py Exploratory analysis
Components 25
Data preparation
- Training data
data/train.csv - Legacy preprocessing
legacy/preprocessing.py - Experiment settings
src/creditscore/config.py - Preparation pipeline
src/creditscore/preprocessing.py
Model experiments
- Exploratory analysis
legacy/eda.py - Model pipelines
legacy/pipelines.py - Decision validation
legacy/decision_validation.py - KNN and trees
legacy/original_models.py - Enhanced models
legacy/enhanced_models.py - Calibration and thresholds
legacy/advanced_models.py - Resampling
legacy/resampling.py - Boosting and ensembles
legacy/ensemble_benchmarks.py - Feature selection
legacy/feature_selection.py - Optuna tuning
legacy/optuna_xgboost.py - Stacking
legacy/stacking.py - Target encoding
legacy/target_encoding.py - Evaluation
legacy/evaluation.py - Historical experiment engine
legacy/archive/credit_score_experiments_full.py
Champion runtime
- Training command
scripts/train_champion_models.py - Champion trainer
src/creditscore/training.py - Prediction command
scripts/predict_with_artifacts.py - Risk predictor
src/creditscore/inference.py
Artifacts and results
- Saved models
models - Metrics and predictions
reports
Other components
- Analyst
Connections 32
- Analyst → Training command: starts training
README.md - Analyst → Prediction command: requests scores
README.md - Training data → Exploratory analysis: examined by
README.md - Training data → Champion trainer: loaded for training
src/creditscore/training.py - Training command → Champion trainer: invokes
scripts/train_champion_models.py - Champion trainer → Preparation pipeline: prepares rows
src/creditscore/training.py - Preparation pipeline → Experiment settings: uses settings
src/creditscore/preprocessing.py - Champion trainer → Experiment settings: uses settings
src/creditscore/training.py - Champion trainer → Saved models: saves artifacts
README.md - Saved models → Risk predictor: loaded by
src/creditscore/inference.py - Prediction command → Risk predictor: invokes
scripts/predict_with_artifacts.py - Prediction command → Training data: reads input rows
README.md - Risk predictor → Preparation pipeline: prepares rows
src/creditscore/inference.py - Risk predictor → Experiment settings: uses settings
src/creditscore/inference.py - Risk predictor → Metrics and predictions: writes predictions
README.md - Exploratory analysis → Metrics and predictions: produces analysis
README.md - Legacy preprocessing → Historical experiment engine: delegates to
legacy/preprocessing.py - Model pipelines → Historical experiment engine: delegates to
legacy/pipelines.py - Evaluation → Historical experiment engine: delegates to
legacy/evaluation.py - Exploratory analysis → Historical experiment engine: delegates to
legacy/eda.py - Boosting and ensembles → Historical experiment engine: delegates to
legacy/ensemble_benchmarks.py - KNN and trees → Historical experiment engine: delegates to
legacy/original_models.py - Enhanced models → Historical experiment engine: delegates to
legacy/enhanced_models.py - Calibration and thresholds → Historical experiment engine: delegates to
legacy/advanced_models.py - Decision validation → Historical experiment engine: delegates to
legacy/decision_validation.py - Resampling → Historical experiment engine: delegates to
legacy/resampling.py - Feature selection → Historical experiment engine: delegates to
legacy/feature_selection.py - Optuna tuning → Historical experiment engine: delegates to
legacy/optuna_xgboost.py - Stacking → Historical experiment engine: delegates to
legacy/stacking.py - Target encoding → Historical experiment engine: delegates to
legacy/target_encoding.py - Historical experiment engine → Metrics and predictions: records experiment results
README.md - Historical experiment engine → Model pipelines: uses sklearn pipelines
legacy/pipelines.py