ChidiebereNjoku/ModelBrief

An open-source Python library that automates the analysis and reporting of machine learning experiments, generating structured and comprehensive reports that make model performance, results, and key insights easier to understand and evaluate by data professionals, with optional Groq-powered AI explanations and recommendations for deeper insights.

What it solves

After you've trained a machine-learning model, you still need to document and evaluate it — metrics, feature importance, error analysis, and so on. ModelBrief automates that step: you hand it a trained model plus your data, and it produces a structured report without retraining or altering the model.

How it works

You pass a trained model and any available train/validation/test data to ModelBrief. It never calls fit — the model is treated as already trained. It inspects the model and data, detects the task type (classification, regression, clustering, time series, etc.), and computes things like performance metrics, confusion matrices, feature importance, and error analysis. It also generates visualisations. The result can be shown in the console, saved as a standalone HTML file, or exported to PDF. Optional AI-generated explanations and recommendations can be added by enabling the ai=True flag, which uses the Groq API (requires an API key and the optional [ai] extra).

ModelBrief supports many frameworks out of the box — scikit-learn, XGBoost, LightGBM, CatBoost, PyTorch, TensorFlow/Keras, and NLP pipelines. For custom data loaders or unusual prediction APIs, you can subclass BaseAdapter and pass it in. Framework-specific dependencies are optional, so you only install what you need.

Who it's for

Data scientists and ML engineers who want quick, consistent, shareable reports on models they've already trained — without writing custom evaluation code. It's also useful for teams that need to document model behaviour for review or handoff, and for contributors who want to extend the library with new adapters or analyses.

Highlights

  • Generates console, standalone HTML, and PDF reports from a single call
  • Works with scikit-learn, XGBoost, LightGBM, CatBoost, PyTorch, TensorFlow, and NLP models
  • Never retrains the model — treats it as already trained
  • Includes model overview, dataset summary, task detection, feature importance, performance metrics, confusion matrix, error analysis, and visualisations
  • Optional AI-generated explanations and recommendations via Groq (disabled by default)
  • Framework-specific dependencies are optional; failed optional analyses become warnings, not fatal errors
  • Extensible via BaseAdapter for custom models and data pipelines

Related

  • Project
  • Project
  • Project
  • Project
  • Project