Skip to main content

Reusable credit risk model evaluation and data utility functions.

Project description

creditriskutilities

CI codecov

creditriskutilities is a lightweight Python package developed to streamline the evaluation and comparison of credit risk classification models. The package abstracts commonly repeated tasks in model assessment — such as computing classification metrics, visualizing feature importance, applying value mappings, and generating side-by-side model comparisons — into standalone, reusable functions. These functions are especially useful in credit analytics pipelines, where consistent and interpretable model evaluation is critical.


Why This Package?

In credit risk analytics, we often work with:

  • Encoded categorical data
  • Tree-based models with feature importances
  • A need to report multiple evaluation metrics
  • Repetitive output saving and visualization logic

Instead of rewriting code across notebooks and scripts, creditriskutilities offers clean, modular tools you can plug directly into your pipeline.


Key Features

  • evaluate_model: Automatically compute and save accuracy, precision, recall, and F1 — plus a CSV report and confusion matrix plot.
  • plot_feature_importance: Visualize top N features by importance and save plot + CSV.
  • compare_models: Compare multiple model metrics in a single bar plot.
  • apply_mappings: Map coded values to readable labels using a dictionary — great for pre-modeling pipelines.
  • create_output_dir: Safely create folders as needed (used internally by other functions).

Who Should Use This?

This package is ideal for:

  • Students and teams building machine learning pipelines in finance
  • Practitioners working with classification problems (especially in credit scoring)
  • Developers who want to avoid re-writing evaluation logic in every notebook or script

Authors

  • Stallon Pinto
  • Ayush Joshi
  • Zhanerke Zhumash

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

creditriskutilities-1.0.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

creditriskutilities-1.0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file creditriskutilities-1.0.1.tar.gz.

File metadata

  • Download URL: creditriskutilities-1.0.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for creditriskutilities-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cbdd31570bfd279864f74f67f58d8f1f579d906d5fb105079bcbae573675eed2
MD5 56182b798be8eb5cf47ca2493f2bf435
BLAKE2b-256 89bf93e9f534eda06686b1a22b4de7ff86ad4e33ad3f1d1faaea2f8ccfdfa6d8

See more details on using hashes here.

File details

Details for the file creditriskutilities-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for creditriskutilities-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a55e33dc2131bec8b07421608ec45e5a13d88bb8da9a365768d686d129b95113
MD5 dc0b0a68052fecdf399cb49494509316
BLAKE2b-256 1f04b6032233affdc22e542f2f2e2b1a9c9ca2a7fba607f925d44a6918bd9c56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page