Skip to main content

A package for generating comprehensive binary classification reports with visualizations and confidence intervals

Project description

Omnibin

A Python package for generating comprehensive binary classification reports with visualizations and confidence intervals.

Installation

pip install omnibin

Usage

import pandas as pd
from omnibin import generate_binary_classification_report

# Load your data
data = pd.read_csv("scores.csv")
y_true = data['y_true'].values
y_scores = data['y_pred'].values

# Generate comprehensive classification report
report_path = generate_binary_classification_report(
    y_true=y_true,
    y_scores=y_scores,
    output_path="classification_report.pdf",
    n_bootstrap=1000
)

Input Format

The input data should be provided as:

  • y_true: Array of true binary labels (0 or 1)
  • y_pred: Array of predicted probabilities or scores

Features

  • Generates a comprehensive PDF report with:
    • ROC curve with confidence bands
    • Precision-Recall curve with confidence bands
    • Metrics vs. threshold plots
    • Confusion matrix at optimal threshold
    • Calibration plot
    • Summary table with confidence intervals
  • Calculates optimal threshold using Youden's J statistic
  • Provides confidence intervals using bootstrapping
  • Supports both probability and score-based predictions

Metrics Included

  • Accuracy
  • Sensitivity (Recall)
  • Specificity
  • Positive Predictive Value (Precision)
  • Matthews Correlation Coefficient
  • F1 Score
  • AUC-ROC
  • AUC-PR

All metrics include 95% confidence intervals calculated through bootstrapping.

Output

The package generates a PDF report containing:

  1. ROC and Precision-Recall curves with confidence bands
  2. Metrics plotted across different thresholds
  3. Confusion matrix at the optimal threshold
  4. Calibration plot
  5. Summary table with all metrics and their confidence intervals

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

omnibin-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

omnibin-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file omnibin-0.1.1.tar.gz.

File metadata

  • Download URL: omnibin-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for omnibin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5e7b43cb8299a3ca82244486e2a2ee8fe6a7f4b37b05dbd934b844882d3f1d61
MD5 1667af361954c5c2592ed8c9b2288cd2
BLAKE2b-256 e6027974e2eb5d8789fc4a377f01dc887faa6e55a24ae76c71244d419311b597

See more details on using hashes here.

File details

Details for the file omnibin-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: omnibin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for omnibin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 082ab5c7d2135c84e5d210a999b246ab82255f19c60e3e968a5c4a553986d807
MD5 ca77f848c72bab9161d5fe9afd1b70fa
BLAKE2b-256 424f5568dcc1c4e13e40ed933f50ebbd43834dbf143d0de1f78aa08e32212a25

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