trusttab 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- trusttab-0.1.0/CHANGELOG.md +18 -0
- trusttab-0.1.0/CONTRIBUTING.md +46 -0
- trusttab-0.1.0/LICENSE +21 -0
- trusttab-0.1.0/MANIFEST.in +6 -0
- trusttab-0.1.0/PKG-INFO +332 -0
- trusttab-0.1.0/README.md +294 -0
- trusttab-0.1.0/docs/api.md +113 -0
- trusttab-0.1.0/docs/calibration-rescue.md +111 -0
- trusttab-0.1.0/docs/datasets.md +63 -0
- trusttab-0.1.0/docs/experiment-tracking.md +166 -0
- trusttab-0.1.0/docs/feature-shift.md +95 -0
- trusttab-0.1.0/docs/metrics.md +51 -0
- trusttab-0.1.0/docs/owner-b.md +115 -0
- trusttab-0.1.0/docs/releasing.md +53 -0
- trusttab-0.1.0/docs/robustness-reporting.md +117 -0
- trusttab-0.1.0/docs/statistics.md +121 -0
- trusttab-0.1.0/docs/tabpfn.md +98 -0
- trusttab-0.1.0/docs/unified-benchmarking.md +196 -0
- trusttab-0.1.0/docs/visualization.md +48 -0
- trusttab-0.1.0/examples/quickstart.py +54 -0
- trusttab-0.1.0/pyproject.toml +105 -0
- trusttab-0.1.0/setup.cfg +4 -0
- trusttab-0.1.0/src/trusttab/__init__.py +5 -0
- trusttab-0.1.0/src/trusttab/api.py +82 -0
- trusttab-0.1.0/src/trusttab/calibration/__init__.py +0 -0
- trusttab-0.1.0/src/trusttab/data/__init__.py +28 -0
- trusttab-0.1.0/src/trusttab/data/adult.py +117 -0
- trusttab-0.1.0/src/trusttab/data/german_credit.py +102 -0
- trusttab-0.1.0/src/trusttab/data/heart_disease.py +229 -0
- trusttab-0.1.0/src/trusttab/data/preprocessing.py +69 -0
- trusttab-0.1.0/src/trusttab/evaluation/__init__.py +31 -0
- trusttab-0.1.0/src/trusttab/evaluation/calibration.py +97 -0
- trusttab-0.1.0/src/trusttab/evaluation/metrics.py +144 -0
- trusttab-0.1.0/src/trusttab/evaluation/operating_region.py +85 -0
- trusttab-0.1.0/src/trusttab/experiments/__init__.py +33 -0
- trusttab-0.1.0/src/trusttab/experiments/benchmark.py +716 -0
- trusttab-0.1.0/src/trusttab/experiments/calibration_protocol.py +67 -0
- trusttab-0.1.0/src/trusttab/experiments/config.py +404 -0
- trusttab-0.1.0/src/trusttab/experiments/feature_shift_runner.py +151 -0
- trusttab-0.1.0/src/trusttab/experiments/resumable.py +372 -0
- trusttab-0.1.0/src/trusttab/experiments/run.py +218 -0
- trusttab-0.1.0/src/trusttab/experiments/runner.py +173 -0
- trusttab-0.1.0/src/trusttab/experiments/seeding.py +33 -0
- trusttab-0.1.0/src/trusttab/experiments/splitting.py +93 -0
- trusttab-0.1.0/src/trusttab/experiments/tracking.py +556 -0
- trusttab-0.1.0/src/trusttab/models/__init__.py +10 -0
- trusttab-0.1.0/src/trusttab/models/model_factory.py +107 -0
- trusttab-0.1.0/src/trusttab/models/tabpfn_adapter.py +45 -0
- trusttab-0.1.0/src/trusttab/noise/__init__.py +17 -0
- trusttab-0.1.0/src/trusttab/noise/feature_shift.py +359 -0
- trusttab-0.1.0/src/trusttab/noise/label_noise.py +85 -0
- trusttab-0.1.0/src/trusttab/reporting/__init__.py +5 -0
- trusttab-0.1.0/src/trusttab/reporting/report.py +1106 -0
- trusttab-0.1.0/src/trusttab/statistics/__init__.py +39 -0
- trusttab-0.1.0/src/trusttab/statistics/comparison.py +444 -0
- trusttab-0.1.0/src/trusttab/statistics/research.py +732 -0
- trusttab-0.1.0/src/trusttab/visualization/__init__.py +19 -0
- trusttab-0.1.0/src/trusttab/visualization/reliability.py +272 -0
- trusttab-0.1.0/src/trusttab.egg-info/PKG-INFO +332 -0
- trusttab-0.1.0/src/trusttab.egg-info/SOURCES.txt +87 -0
- trusttab-0.1.0/src/trusttab.egg-info/dependency_links.txt +1 -0
- trusttab-0.1.0/src/trusttab.egg-info/entry_points.txt +2 -0
- trusttab-0.1.0/src/trusttab.egg-info/requires.txt +17 -0
- trusttab-0.1.0/src/trusttab.egg-info/top_level.txt +1 -0
- trusttab-0.1.0/tests/test_adult.py +101 -0
- trusttab-0.1.0/tests/test_benchmark.py +290 -0
- trusttab-0.1.0/tests/test_calibration.py +160 -0
- trusttab-0.1.0/tests/test_calibration_experiment.py +248 -0
- trusttab-0.1.0/tests/test_calibration_splitting.py +76 -0
- trusttab-0.1.0/tests/test_config.py +443 -0
- trusttab-0.1.0/tests/test_core_matrix.py +130 -0
- trusttab-0.1.0/tests/test_data.py +91 -0
- trusttab-0.1.0/tests/test_experiments.py +305 -0
- trusttab-0.1.0/tests/test_feature_shift.py +166 -0
- trusttab-0.1.0/tests/test_feature_shift_experiments.py +192 -0
- trusttab-0.1.0/tests/test_heart_disease.py +205 -0
- trusttab-0.1.0/tests/test_metrics.py +153 -0
- trusttab-0.1.0/tests/test_models.py +223 -0
- trusttab-0.1.0/tests/test_noise.py +125 -0
- trusttab-0.1.0/tests/test_operating_region.py +65 -0
- trusttab-0.1.0/tests/test_package.py +51 -0
- trusttab-0.1.0/tests/test_preprocessing.py +79 -0
- trusttab-0.1.0/tests/test_reporting.py +286 -0
- trusttab-0.1.0/tests/test_research_statistics.py +185 -0
- trusttab-0.1.0/tests/test_resumable.py +206 -0
- trusttab-0.1.0/tests/test_statistics.py +228 -0
- trusttab-0.1.0/tests/test_tabpfn_adapter.py +75 -0
- trusttab-0.1.0/tests/test_tracking.py +299 -0
- trusttab-0.1.0/tests/test_visualization.py +173 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
This project follows semantic versioning once public releases begin. Until the
|
|
4
|
+
first PyPI release, unreleased implementation work is recorded here and in
|
|
5
|
+
`IMPLEMENTATION_PROGRESS.md`.
|
|
6
|
+
|
|
7
|
+
## 0.1.0 (Unreleased)
|
|
8
|
+
|
|
9
|
+
- Add German Credit, processed Cleveland Heart Disease, and optional Adult
|
|
10
|
+
dataset loaders.
|
|
11
|
+
- Add train-only preprocessing, reproducible independent Bernoulli label
|
|
12
|
+
noise, four optional/classical model paths, Platt calibration, evaluation,
|
|
13
|
+
statistical analysis, reporting, and local experiment tracking.
|
|
14
|
+
- Add the curated `trusttab.api` convenience surface and offline quick-start.
|
|
15
|
+
- Document the completed 200-condition core research run, its 40 clean-baseline
|
|
16
|
+
references, the seed-level statistical protocol, and the unanswered RQ4
|
|
17
|
+
calibration question. Experiment outputs remain separate from package data.
|
|
18
|
+
- Package is not published to PyPI; see `docs/releasing.md` before release.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Contributing to TrustTab
|
|
2
|
+
|
|
3
|
+
Thank you for helping improve TrustTab. Keep changes focused, preserve
|
|
4
|
+
existing user work, and do not include dataset records, model weights, API
|
|
5
|
+
keys, or other credentials in commits.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
Use Python 3.11 or 3.12 and install the development extra:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python -m pip install -e ".[dev]"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Optional backends are separate:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python -m pip install -e ".[xgboost]"
|
|
19
|
+
python -m pip install -e ".[tabpfn]"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
TabPFN weights are separately licensed and gated. Follow
|
|
23
|
+
[`docs/tabpfn.md`](docs/tabpfn.md) and never store tokens in source, config,
|
|
24
|
+
tests, or logs.
|
|
25
|
+
|
|
26
|
+
## Local checks
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ruff check .
|
|
30
|
+
ruff format --check .
|
|
31
|
+
pytest -q
|
|
32
|
+
python -m build --sdist --wheel
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Unit tests should use offline fixtures. Do not run the complete research
|
|
36
|
+
matrix as part of ordinary tests. Use a bounded configuration for integration
|
|
37
|
+
checks, and label synthetic tests as implementation tests rather than research
|
|
38
|
+
results.
|
|
39
|
+
|
|
40
|
+
## Research-method changes
|
|
41
|
+
|
|
42
|
+
Do not change dataset versions, split proportions, label-noise semantics,
|
|
43
|
+
random seed derivation, calibration separation, model parameters, or metric
|
|
44
|
+
conventions without documenting the scientific impact and obtaining review.
|
|
45
|
+
Never tune against the test set. Preserve failed and missing conditions as
|
|
46
|
+
such; do not fabricate results.
|
trusttab-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TrustTab Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
trusttab-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: trusttab
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Reliability-aware stress testing for tabular machine learning
|
|
5
|
+
Author: TrustTab Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Shreya-nipunge/trusttab
|
|
8
|
+
Project-URL: Repository, https://github.com/Shreya-nipunge/trusttab
|
|
9
|
+
Project-URL: Documentation, https://github.com/Shreya-nipunge/trusttab/tree/main/docs
|
|
10
|
+
Project-URL: Issues, https://github.com/Shreya-nipunge/trusttab/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/Shreya-nipunge/trusttab/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: machine-learning,tabular-data,label-noise,model-reliability,calibration
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Requires-Python: <3.13,>=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: numpy>=1.24
|
|
24
|
+
Requires-Dist: pandas>=2.0
|
|
25
|
+
Requires-Dist: scikit-learn>=1.6
|
|
26
|
+
Requires-Dist: matplotlib>=3.7
|
|
27
|
+
Requires-Dist: PyYAML>=6.0
|
|
28
|
+
Requires-Dist: scipy>=1.10
|
|
29
|
+
Provides-Extra: xgboost
|
|
30
|
+
Requires-Dist: xgboost>=2.0; extra == "xgboost"
|
|
31
|
+
Provides-Extra: tabpfn
|
|
32
|
+
Requires-Dist: tabpfn==10.0.0; extra == "tabpfn"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
35
|
+
Requires-Dist: ruff==0.5.7; extra == "dev"
|
|
36
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# TrustTab
|
|
40
|
+
|
|
41
|
+
TrustTab is a Python framework for measuring predictive performance and
|
|
42
|
+
probability reliability of tabular classifiers under controlled training-label
|
|
43
|
+
noise and test-time feature shifts. It provides reproducible experiments and
|
|
44
|
+
research-oriented summaries; it does not claim that any model is universally
|
|
45
|
+
robust.
|
|
46
|
+
|
|
47
|
+
## Capabilities
|
|
48
|
+
|
|
49
|
+
- Logistic Regression and Random Forest, with optional XGBoost and TabPFN
|
|
50
|
+
- German Credit and processed Cleveland Heart Disease loaders; Adult Census
|
|
51
|
+
Income remains available as an additional dataset
|
|
52
|
+
- Clean baselines, symmetric training-label noise, and numeric/categorical
|
|
53
|
+
feature shifts
|
|
54
|
+
- Opt-in Platt calibration experiments using separate clean calibration data
|
|
55
|
+
- Accuracy, balanced accuracy, macro F1, ROC-AUC, Brier score, ECE, adaptive
|
|
56
|
+
ECE, maximum calibration error, and log loss
|
|
57
|
+
- Platt scaling in the integrated calibration experiment; isolated utilities
|
|
58
|
+
also expose isotonic calibration
|
|
59
|
+
- Paired statistical comparisons with multiple-comparison corrections
|
|
60
|
+
- CSV benchmarks, Markdown reports, headless figures, and a local run registry
|
|
61
|
+
|
|
62
|
+
The package is organized under `src/trusttab/`: `data` and `models` prepare
|
|
63
|
+
inputs and estimators; `noise` creates perturbations; `experiments` orchestrates
|
|
64
|
+
runs and tracking; `evaluation`, `statistics`, `visualization`, and `reporting`
|
|
65
|
+
analyze results.
|
|
66
|
+
|
|
67
|
+
## Install
|
|
68
|
+
|
|
69
|
+
Python 3.11 or 3.12 is supported.
|
|
70
|
+
|
|
71
|
+
After the approved PyPI release, install the public distribution with:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
python -m pip install trusttab
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The package has not been published to PyPI yet. To install the current source
|
|
78
|
+
checkout, use:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python -m pip install .
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For development, tests, linting, and builds:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
python -m pip install -e ".[dev]"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Optional models can be installed separately:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
python -m pip install -e ".[xgboost]"
|
|
94
|
+
python -m pip install -e ".[tabpfn]"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The `tabpfn` extra pins TabPFN 10.0.0; it is not installed with core TrustTab
|
|
98
|
+
dependencies. See the [TabPFN compatibility and hardware notes](docs/tabpfn.md)
|
|
99
|
+
before enabling it. TabPFN-3.5 weights are separately licensed and gated;
|
|
100
|
+
users must accept the model terms and authorize their own local download.
|
|
101
|
+
The default TabPFN-3.5 weights are under Prior Labs' non-commercial,
|
|
102
|
+
non-production license; commercial or production use requires rights from
|
|
103
|
+
Prior Labs. TrustTab does not bundle or redistribute model weights. See the
|
|
104
|
+
[TabPFN license and access notes](docs/tabpfn.md). The current license also
|
|
105
|
+
restricts use of model outputs to non-commercial purposes and includes user
|
|
106
|
+
eligibility conditions; review the [full Prior Labs license](https://huggingface.co/Prior-Labs/tabpfn_3_5/blob/main/LICENSE)
|
|
107
|
+
before accessing the checkpoint.
|
|
108
|
+
|
|
109
|
+
## Platt calibration rescue
|
|
110
|
+
|
|
111
|
+
Calibration is an opt-in secondary experiment. See the [calibration-rescue
|
|
112
|
+
protocol](docs/calibration-rescue.md) and run its bounded one-model smoke
|
|
113
|
+
configuration with:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
python -m trusttab.experiments.run --config configs/calibration_rescue_smoke.yaml
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The calibration experiment uses separate stratified train, calibration, and
|
|
120
|
+
test subsets. Only training labels are noise-corrupted; calibration labels
|
|
121
|
+
remain clean, and test labels are used only for final evaluation. Raw metrics
|
|
122
|
+
remain in the standard columns and corresponding calibrated metrics use a
|
|
123
|
+
`calibrated_` prefix. Calibration is disabled in the core configuration by
|
|
124
|
+
default, consistent with the blueprint's secondary-experiment design.
|
|
125
|
+
|
|
126
|
+
## Quick start
|
|
127
|
+
|
|
128
|
+
From a repository checkout, run the small two-model, two-seed end-to-end
|
|
129
|
+
benchmark (including label noise, feature shift, reporting, and local tracking):
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
trusttab --config configs/final_smoke_test.yaml
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The YAML templates are repository files and are not bundled in the wheel. A
|
|
136
|
+
pip-only installation can use the Python API below or provide its own YAML
|
|
137
|
+
configuration; the CLI does not silently select the 200-condition research
|
|
138
|
+
configuration.
|
|
139
|
+
|
|
140
|
+
The Python API also supports a unified benchmark:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
from trusttab.api import run_robustness_benchmark
|
|
144
|
+
|
|
145
|
+
results = run_robustness_benchmark(
|
|
146
|
+
dataset_name="german_credit",
|
|
147
|
+
label_noise_levels=[0.0, 0.2],
|
|
148
|
+
feature_shifts=[
|
|
149
|
+
{"type": "mean_shift", "features": ["age"], "magnitude": 0.5}
|
|
150
|
+
],
|
|
151
|
+
model_names=["logistic_regression", "random_forest"],
|
|
152
|
+
seeds=[1, 2, 3],
|
|
153
|
+
output_path="results/benchmark.csv",
|
|
154
|
+
)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Dataset loading may require network access on the first use if the source data
|
|
158
|
+
is not already available. Unit tests use local fixtures and do not download
|
|
159
|
+
datasets.
|
|
160
|
+
|
|
161
|
+
See the [public API guide](docs/api.md) for supported imports and
|
|
162
|
+
[`examples/quickstart.py`](examples/quickstart.py) for a runnable synthetic
|
|
163
|
+
example that does not download a dataset.
|
|
164
|
+
|
|
165
|
+
## Datasets and attribution
|
|
166
|
+
|
|
167
|
+
The research benchmark pair is German Credit and the processed Cleveland
|
|
168
|
+
subset of UCI Heart Disease (UCI dataset ID 45). TrustTab reads only
|
|
169
|
+
`processed.cleveland.data`; it does not combine the Cleveland, Hungarian,
|
|
170
|
+
Switzerland, and VA databases. The original `num` target is preserved in
|
|
171
|
+
`y.attrs["original_num"]` and mapped to binary labels as `0 → 0` and
|
|
172
|
+
`1, 2, 3, 4 → 1`. The 303 rows and 13 source features are retained. Source
|
|
173
|
+
missing values in `ca` and `thal` remain missing in the returned features;
|
|
174
|
+
the experiment pipeline imputes them after splitting, using training data
|
|
175
|
+
only. An optional `data_home` argument caches the processed Cleveland rows,
|
|
176
|
+
including the original `num` target, as a local CSV.
|
|
177
|
+
|
|
178
|
+
Heart Disease citation: Janosi, A., Steinbrunn, W., Pfisterer, M., & Detrano,
|
|
179
|
+
R. (1989). *Heart Disease*. UCI Machine Learning Repository,
|
|
180
|
+
[dataset ID 45](https://archive.ics.uci.edu/dataset/45/heart),
|
|
181
|
+
[DOI 10.24432/C52P4X](https://doi.org/10.24432/C52P4X). The dataset is
|
|
182
|
+
licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
|
183
|
+
Attribution: Heart Disease dataset by Janosi, Steinbrunn, Pfisterer, and
|
|
184
|
+
Detrano, hosted by the UCI Machine Learning Repository, used under CC BY 4.0.
|
|
185
|
+
See [dataset loading details](docs/datasets.md) for source and missing-value
|
|
186
|
+
behavior.
|
|
187
|
+
|
|
188
|
+
## Configuration and CLI
|
|
189
|
+
|
|
190
|
+
YAML configurations are validated before execution. See
|
|
191
|
+
[`configs/a6_smoke_test.yaml`](configs/a6_smoke_test.yaml) for a small runnable
|
|
192
|
+
configuration and [`configs/experiments.yaml`](configs/experiments.yaml) for
|
|
193
|
+
the configured 200-condition research matrix. Use
|
|
194
|
+
[`configs/phase3_smoke_test.yaml`](configs/phase3_smoke_test.yaml) for a small
|
|
195
|
+
two-model, two-noise-level check. Dataset downloads may require network access
|
|
196
|
+
when the data is not cached.
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
trusttab --help
|
|
200
|
+
trusttab --config configs/experiments.yaml
|
|
201
|
+
trusttab --list-runs --runs-dir experiments/runs
|
|
202
|
+
trusttab --inspect-run RUN_ID --runs-dir experiments/runs
|
|
203
|
+
trusttab --compare-runs RUN_ID_A RUN_ID_B --runs-dir experiments/runs
|
|
204
|
+
trusttab --verify-run RUN_ID --runs-dir experiments/runs
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Enable local tracking with `tracking: {enabled: true}` in YAML. Run commands
|
|
208
|
+
write benchmark output to the configured output location; tracked artifacts are
|
|
209
|
+
stored under `experiments/runs` unless configured otherwise.
|
|
210
|
+
|
|
211
|
+
## Analysis and reports
|
|
212
|
+
|
|
213
|
+
The reporting API accepts unified benchmark results:
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from trusttab.reporting import generate_robustness_report
|
|
217
|
+
|
|
218
|
+
artifacts = generate_robustness_report(results, "results/report")
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
It produces a Markdown report, CSV summaries, and headless PNG figures. See
|
|
222
|
+
the [benchmark](docs/unified-benchmarking.md),
|
|
223
|
+
[metrics](docs/metrics.md), [statistics](docs/statistics.md),
|
|
224
|
+
[visualization](docs/visualization.md), [reporting](docs/robustness-reporting.md),
|
|
225
|
+
and [tracking](docs/experiment-tracking.md) guides.
|
|
226
|
+
|
|
227
|
+
The report also provides seed-blocked Friedman/Nemenyi model comparisons,
|
|
228
|
+
paired raw-versus-calibrated ECE/Brier tests, normalized degradation slopes,
|
|
229
|
+
effect sizes, and small-sample confidence intervals. These are exploratory
|
|
230
|
+
with five seeds, and the two datasets are analyzed separately rather than
|
|
231
|
+
treated as a sample of datasets. See [docs/statistics.md](docs/statistics.md)
|
|
232
|
+
for the analysis protocol and its limits. Running the report does not run
|
|
233
|
+
experiments or establish empirical conclusions by itself.
|
|
234
|
+
|
|
235
|
+
## Outputs and reproducibility
|
|
236
|
+
|
|
237
|
+
Benchmark CSV rows identify the dataset, model, scenario, perturbation,
|
|
238
|
+
corruption level, seed, metrics, sample counts, and baseline link. Tracked runs
|
|
239
|
+
also retain original and normalized configuration, configuration hash,
|
|
240
|
+
environment and Git metadata, dataset fingerprints, results, and report
|
|
241
|
+
artifacts. Re-execution checks numerical agreement using configurable absolute
|
|
242
|
+
and relative tolerances. Numerical reproducibility does not imply bitwise
|
|
243
|
+
identity across hardware, dependency versions, or nondeterministic estimators.
|
|
244
|
+
|
|
245
|
+
## Completed core research run
|
|
246
|
+
|
|
247
|
+
The completed core experiment evaluates whether predictive performance and
|
|
248
|
+
probability reliability change differently as training labels become noisier.
|
|
249
|
+
It covers Logistic Regression, Random Forest, XGBoost, and TabPFN on German
|
|
250
|
+
Credit (OpenML ID 31) and the processed Cleveland subset of UCI Heart Disease
|
|
251
|
+
(UCI ID 45), at noise rates 0%, 10%, 20%, 30%, and 40%, with seeds 0 through
|
|
252
|
+
4. This is 200 noise conditions plus 40 clean-baseline reference rows, for 240
|
|
253
|
+
result rows. Adult remains an optional loader and is not part of this core
|
|
254
|
+
matrix. Cleveland uses only the processed Cleveland file, not a merge of UCI's
|
|
255
|
+
four heart-disease databases.
|
|
256
|
+
|
|
257
|
+
Training labels use independent per-example Bernoulli flips; the realized
|
|
258
|
+
corruption count varies around its expectation. Calibration and test labels
|
|
259
|
+
remain clean. The implementation follows the blueprint's mathematical
|
|
260
|
+
definition of independent flips; an earlier fixed-count pseudocode fragment
|
|
261
|
+
was inconsistent and was corrected. The original research pair of German
|
|
262
|
+
Credit and Heart Disease is retained, with the approved processed Cleveland
|
|
263
|
+
subset as the Heart Disease source.
|
|
264
|
+
|
|
265
|
+
The run records Accuracy, Balanced Accuracy, Macro-F1, ROC-AUC, ECE, and Brier
|
|
266
|
+
Score. The primary model inference is dataset-specific, seed-blocked Friedman
|
|
267
|
+
testing with Nemenyi post-hoc comparisons gated on the omnibus result and
|
|
268
|
+
Holm correction within the planned families. Degradation-slope comparisons
|
|
269
|
+
use paired seed-level results. Descriptive intervals bootstrap the five seed
|
|
270
|
+
units. The generated compatibility table also includes supplementary paired
|
|
271
|
+
t-tests; these are exploratory, not the primary planned analysis. Calibration
|
|
272
|
+
was disabled in the core matrix, so no core raw-versus-calibrated inference is
|
|
273
|
+
available and **RQ4 (the Platt calibration question) remains unanswered**.
|
|
274
|
+
|
|
275
|
+
Interpretation is limited by five seeds and two fixed datasets; these do not
|
|
276
|
+
support broad claims about all datasets. Cleveland's 61-row test partition
|
|
277
|
+
makes its metric estimates especially coarse. The saved aggregate results do
|
|
278
|
+
not retain per-observation predictions, so final metrics cannot be
|
|
279
|
+
independently recomputed from the CSV alone. The preserved run, manifest,
|
|
280
|
+
report tables, figures, and RQ0-RQ4 findings are in the local working copy at
|
|
281
|
+
`experiments/runs/trusttab-core-20261114/`; they are research outputs, not
|
|
282
|
+
package data, and are not included in the wheel.
|
|
283
|
+
|
|
284
|
+
## Research assumptions and limitations
|
|
285
|
+
|
|
286
|
+
- Label noise uses independent Bernoulli flips on training labels: each label
|
|
287
|
+
is flipped with the configured probability. The realized flip count is random
|
|
288
|
+
(expected to be `noise_rate × n_train`), not fixed to that value. Test labels
|
|
289
|
+
remain clean. Real annotation errors may be class-dependent or structured.
|
|
290
|
+
- Feature shifts are controlled synthetic interventions and do not represent
|
|
291
|
+
every real distribution shift.
|
|
292
|
+
- ECE and related binned calibration metrics depend on binning choices and can
|
|
293
|
+
be noisy on small samples. ROC-AUC is undefined when an evaluation split has
|
|
294
|
+
one class.
|
|
295
|
+
- Paired tests require aligned observations/seeds and rely on their own
|
|
296
|
+
assumptions. Small seed counts have limited power; multiplicity correction
|
|
297
|
+
does not remove this limitation.
|
|
298
|
+
- German Credit, processed Cleveland Heart Disease, and Adult are limited
|
|
299
|
+
benchmark datasets and should not be treated as representative of all
|
|
300
|
+
tabular applications.
|
|
301
|
+
- Optional model implementations may have model-specific constraints and
|
|
302
|
+
nondeterminism. Reproducibility metadata helps interpret reruns but cannot
|
|
303
|
+
guarantee identical results everywhere.
|
|
304
|
+
- Robustness under a specified perturbation is distinct from clean predictive
|
|
305
|
+
accuracy and does not establish universal reliability.
|
|
306
|
+
|
|
307
|
+
## Citation
|
|
308
|
+
|
|
309
|
+
For the software, cite the TrustTab repository and released version used in
|
|
310
|
+
your work: Shreya Nipunge et al., *TrustTab: Reliability-Aware Stress Testing
|
|
311
|
+
for Tabular Machine Learning*, GitHub repository
|
|
312
|
+
<https://github.com/Shreya-nipunge/trusttab>, version `0.1.0` (update the
|
|
313
|
+
version to the release actually used). For the Cleveland benchmark, cite the
|
|
314
|
+
UCI Heart Disease dataset separately using the DOI and CC BY 4.0 attribution
|
|
315
|
+
above. Do not cite smoke-test outputs as research findings.
|
|
316
|
+
|
|
317
|
+
## Development
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
python -m pip install -e ".[dev]"
|
|
321
|
+
pytest -q
|
|
322
|
+
ruff check src tests
|
|
323
|
+
ruff format --check src tests
|
|
324
|
+
python -m build
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Run these checks locally on Python 3.11 or 3.12. The test suite uses local
|
|
328
|
+
fixtures and does not download datasets or require optional model packages.
|
|
329
|
+
|
|
330
|
+
Ruff format currently excludes 29 legacy source and test files from its format
|
|
331
|
+
check; the remaining files are checked. These exclusions are an explicit
|
|
332
|
+
cleanup backlog, not a claim that those files match formatter output.
|