felipekitamura commited on
Commit
8c39b33
·
verified ·
1 Parent(s): cb88ded

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -99
README.md CHANGED
@@ -1,99 +1,14 @@
1
- # Omnibin
2
-
3
- A Python package for generating comprehensive binary classification reports with visualizations and confidence intervals.
4
-
5
- ## Try it Online
6
-
7
- You can try Omnibin directly in your browser through our [Hugging Face Space](https://felipekitamura-omnibin.hf.space).
8
-
9
- ## Installation
10
-
11
- ```bash
12
- pip install omnibin
13
- ```
14
-
15
- ## Usage
16
-
17
- ```python
18
- import pandas as pd
19
- from omnibin import generate_binary_classification_report, ColorScheme
20
-
21
- # Load your data
22
- data = pd.read_csv("data/scores.csv")
23
- y_true = data['y_true'].values
24
- y_scores = data['y_pred'].values
25
-
26
- # Generate comprehensive classification report
27
- report_path = generate_binary_classification_report(
28
- y_true=y_true, # Array of true binary labels (0 or 1)
29
- y_scores=y_scores, # Array of predicted probabilities or scores
30
- output_path="classification_report.pdf", # Path to save the PDF report
31
- n_bootstrap=1000, # Number of bootstrap iterations for confidence intervals
32
- random_seed=42, # Random seed for reproducibility
33
- dpi=300, # DPI for plot resolution
34
- color_scheme=ColorScheme.DEFAULT # Color scheme for plots (DEFAULT, MONOCHROME, or VIBRANT)
35
- )
36
- ```
37
-
38
- ## Input Format
39
-
40
- The input data should be provided as:
41
- - `y_true`: Array of true binary labels (0 or 1)
42
- - `y_pred`: Array of predicted probabilities or scores
43
-
44
- ## Features
45
-
46
- - Generates a comprehensive PDF report with:
47
- - ROC curve with confidence bands
48
- - Precision-Recall curve with confidence bands
49
- - Metrics vs. threshold plots
50
- - Confusion matrix at optimal threshold
51
- - Calibration plot
52
- - Summary table with confidence intervals
53
- - Calculates optimal threshold using Youden's J statistic
54
- - Provides confidence intervals using bootstrapping
55
- - Supports both probability and score-based predictions
56
-
57
- ## Metrics Included
58
-
59
- - Accuracy
60
- - Sensitivity (Recall)
61
- - Specificity
62
- - Positive Predictive Value (Precision)
63
- - Matthews Correlation Coefficient
64
- - F1 Score
65
- - AUC-ROC
66
- - AUC-PR
67
-
68
- All metrics include 95% confidence intervals calculated through bootstrapping.
69
-
70
- ## Output
71
-
72
- The package generates a PDF report containing:
73
- 1. ROC and Precision-Recall curves with confidence bands
74
- 2. Metrics plotted across different thresholds
75
- 3. Confusion matrix at the optimal threshold
76
- 4. Calibration plot
77
- 5. Summary table with all metrics and their confidence intervals
78
-
79
- ## Example
80
-
81
- Here are examples of the visualizations generated by Omnibin:
82
-
83
- ### ROC and Precision-Recall Curves
84
- ![ROC and PR Curves](results/plots/roc_pr.png)
85
-
86
- ### Metrics vs Threshold
87
- <img src="results/plots/metrics_threshold.png">
88
-
89
- ### Confusion Matrix
90
- <img src="results/plots/confusion_matrix.png">
91
-
92
- ### Calibration Plot
93
- <img src="results/plots/calibration.png">
94
-
95
- ### Prediction Distribution
96
- <img src="results/plots/prediction_distribution.png">
97
-
98
- ### Metrics Summary
99
- ![Metrics Summary](results/plots/metrics_summary.png)
 
1
+ ---
2
+ title: Omnibin
3
+ emoji:
4
+ colorFrom: pink
5
+ colorTo: yellow
6
+ sdk: gradio
7
+ sdk_version: 5.29.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ short_description: A Python package for generating comprehensive binary classif
12
+ ---
13
+
14
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference