A Python package for easy analysis of tabular data for inference models, focusing on model-agnostic diagnostics using predictions.
Project description
tab-right
Overview
tab-right is a Python package designed to simplify the analysis of tabular data for inference models—both machine learning and non-ML. The core philosophy is that most analyses, such as segmentation strength, drift analysis, and feature predictive value, can be performed using model predictions alone, without direct access to the model itself. This approach enables powerful, model-agnostic diagnostics and interpretability, making the package easy to implement and use.
Key Features
- Segmentation Analysis: Analyze prediction strength across different data segments to uncover model biases and subgroup performance
- Feature Analysis: Assess feature predictive power and value to inference, using techniques like feature importance, partial dependence, and more
- Drift Detection: Perform drift analysis and monitor changes in data or prediction distributions over time
- Rich Visualizations: Generate comprehensive visualization reports for all analyses, supporting both interactive and static outputs
- Model-Agnostic: Focus on data and predictions, not model internals, for maximum flexibility and simplicity
Installation
# Install from PyPI
pip install tab-right
# For development version
pip install git+https://github.com/DanielAvdar/tab-right.git
Quick Start
Here's a simple example to get you started with tab-right:
import pandas as pd
import numpy as np
from tab_right.segmentations import calc_seg
# Load your data
data = pd.DataFrame({
'feature_1': np.random.normal(0, 1, 1000),
'feature_2': np.random.normal(0, 1, 1000),
'predictions': np.random.uniform(0, 1, 1000)
})
# Perform segmentation analysis
segments = calc_seg(
df=data,
target_col='predictions',
max_depth=3
)
# Print segmentation results
print(segments)
Documentation
For detailed documentation and examples, visit our documentation site.
The documentation includes:
- Comprehensive API reference
- In-depth tutorials
- Example notebooks
- Best practices guide
Use Cases
- Model Evaluation: Compare model performance across different data segments
- Model Monitoring: Track model drift and data distribution changes over time
- Feature Engineering: Identify which features contribute most to predictions
- Bias Detection: Uncover potential biases in model predictions across subgroups
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
See CONTRIBUTING.md for contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use tab-right in a research paper, please cite it as:
@software{tab-right,
author = {Avdar, Daniel},
title = {tab-right: Model-Agnostic Analysis for Tabular Data},
year = {2023},
url = {https://github.com/DanielAvdar/tab-right}
}
Support
For questions, issues, or feature requests, please use the GitHub issue tracker.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tab_right-0.0.1b0.tar.gz.
File metadata
- Download URL: tab_right-0.0.1b0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbfff6b4fd873c9e920503c66ba1c68567c3563ce910cd081a0d583f33cb2db1
|
|
| MD5 |
8cff52f31f00f89bf7d774cceccab4e9
|
|
| BLAKE2b-256 |
c8cf1eb5b14146ef5b3abdef01030265bb29859075e9d3158a0b5278e2c4c024
|
File details
Details for the file tab_right-0.0.1b0-py3-none-any.whl.
File metadata
- Download URL: tab_right-0.0.1b0-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6ec1ef16a3f51e97e4f15633a008af8101eeb4192f45c9f2d4d0851c9f2cab1
|
|
| MD5 |
5e26e79be1e23763d561136fec664345
|
|
| BLAKE2b-256 |
c6603d047bd6eba7dc7bdc544bff19d68af15f387dd062e1f845c24c7f3468ef
|