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.2.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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: creditriskutilities-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 946b0c518d8851db4146f67bde5528fad32b7f92d8f8276f47db58dc704aadab
MD5 4510995d14c59f1dc5e5337169995c74
BLAKE2b-256 37dd9b6da136f6e7adc37bd33ee76ae43cd190a5e8ebc3082db3486eff631a01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for creditriskutilities-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bbd767c04e59a61fbd7180a7ab5bb882be582bd27083ba7df7171b8f294b0064
MD5 d1962e8593d00811287d9a01e3a24fac
BLAKE2b-256 9041c3beda0b1d6cacec5c8677248b5caf3d7296aa19cac3227e1ce9362987df

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