badr 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.
- badr-0.1.0/.github/workflows/release.yml +53 -0
- badr-0.1.0/.gitignore +32 -0
- badr-0.1.0/.readthedocs.yaml +20 -0
- badr-0.1.0/LICENSE +674 -0
- badr-0.1.0/PKG-INFO +56 -0
- badr-0.1.0/README.md +24 -0
- badr-0.1.0/badr/__base__.py +126 -0
- badr-0.1.0/badr/__init__.py +13 -0
- badr-0.1.0/badr/_version.py +1 -0
- badr-0.1.0/badr/algorithms/__base__.py +90 -0
- badr-0.1.0/badr/algorithms/__init__.py +13 -0
- badr-0.1.0/badr/algorithms/badr.py +247 -0
- badr-0.1.0/badr/algorithms/frank_wolfe.py +137 -0
- badr-0.1.0/badr/algorithms/slsqp.py +130 -0
- badr-0.1.0/badr/algorithms/trust_constr.py +111 -0
- badr-0.1.0/badr/datasets/__init__.py +207 -0
- badr-0.1.0/badr/datasets/adult.py +200 -0
- badr-0.1.0/badr/datasets/arrhythmia.py +404 -0
- badr-0.1.0/badr/datasets/communities_and_crime.py +143 -0
- badr-0.1.0/badr/datasets/compas.py +178 -0
- badr-0.1.0/badr/datasets/dataframe.py +168 -0
- badr-0.1.0/badr/datasets/folktables.py +881 -0
- badr-0.1.0/badr/datasets/german_credit.py +255 -0
- badr-0.1.0/badr/datasets/law_school.py +150 -0
- badr-0.1.0/badr/datasets/parkinsons_telemonitoring.py +117 -0
- badr-0.1.0/badr/datasets/student_performance.py +159 -0
- badr-0.1.0/badr/metrics/__base__.py +90 -0
- badr-0.1.0/badr/metrics/__init__.py +19 -0
- badr-0.1.0/badr/metrics/demographic_parity.py +53 -0
- badr-0.1.0/badr/metrics/disparate_mistreatment.py +35 -0
- badr-0.1.0/badr/metrics/equal_opportunity.py +43 -0
- badr-0.1.0/badr/metrics/equalized_odds.py +55 -0
- badr-0.1.0/badr/metrics/group_variance.py +61 -0
- badr-0.1.0/badr/metrics/hsic.py +38 -0
- badr-0.1.0/badr/metrics/individual_fairness.py +58 -0
- badr-0.1.0/badr/models/__base__.py +106 -0
- badr-0.1.0/badr/models/__init__.py +14 -0
- badr-0.1.0/badr/models/_logistic_regression.py +267 -0
- badr-0.1.0/badr/models/_ridge_regression.py +363 -0
- badr-0.1.0/badr/models/_smooth_svm.py +467 -0
- badr-0.1.0/badr/oracles/__base__.py +101 -0
- badr-0.1.0/badr/oracles/__init__.py +5 -0
- badr-0.1.0/badr/oracles/implicit_oracle.py +125 -0
- badr-0.1.0/badr/oracles/stochastic_oracle.py +385 -0
- badr-0.1.0/docs/getting-started/index.md +93 -0
- badr-0.1.0/docs/images/favicon.png +0 -0
- badr-0.1.0/docs/index.md +63 -0
- badr-0.1.0/docs/javascripts/katex.js +10 -0
- badr-0.1.0/docs/reference/algorithms.md +16 -0
- badr-0.1.0/docs/reference/badr.md +16 -0
- badr-0.1.0/docs/reference/datasets.md +16 -0
- badr-0.1.0/docs/reference/index.md +23 -0
- badr-0.1.0/docs/reference/metrics.md +26 -0
- badr-0.1.0/docs/reference/models.md +22 -0
- badr-0.1.0/docs/reference/oracles.md +16 -0
- badr-0.1.0/docs/requirements.txt +5 -0
- badr-0.1.0/docs/styles/pygments-dark.css +439 -0
- badr-0.1.0/docs/styles/pygments-light.css +347 -0
- badr-0.1.0/experiments/experiment_1/experiment_1.ipynb +883 -0
- badr-0.1.0/experiments/experiment_2/logs.jsonl +2102 -0
- badr-0.1.0/experiments/experiment_2/notebook.ipynb +56 -0
- badr-0.1.0/experiments/experiment_2/plotter.py +213 -0
- badr-0.1.0/experiments/experiment_2/results.jsonl +4500 -0
- badr-0.1.0/experiments/experiment_2/results_completed_keys.json +6305 -0
- badr-0.1.0/experiments/experiment_2/script.py +519 -0
- badr-0.1.0/experiments/experiment_3/notebook.ipynb +381 -0
- badr-0.1.0/experiments/experiment_3/outputs/classification_records.jsonl +375 -0
- badr-0.1.0/experiments/experiment_3/outputs/classification_summary.json +30 -0
- badr-0.1.0/experiments/experiment_3/outputs/regression_records.jsonl +200 -0
- badr-0.1.0/experiments/experiment_3/outputs/regression_summary.json +30 -0
- badr-0.1.0/experiments/experiment_3/script.py +446 -0
- badr-0.1.0/experiments/figure_2/data_dict.json +1865 -0
- badr-0.1.0/experiments/figure_2/results.json +752 -0
- badr-0.1.0/experiments/figure_2/script.py +935 -0
- badr-0.1.0/experiments/scalability/badr_results.json +120659 -0
- badr-0.1.0/experiments/scalability/badr_scalability.py +246 -0
- badr-0.1.0/experiments/scalability/group_scalability.pkl +0 -0
- badr-0.1.0/experiments/scalability/notebook.ipynb +373 -0
- badr-0.1.0/figures/badr_scales.pdf +0 -0
- badr-0.1.0/figures/experiment_1_2gr.pdf +0 -0
- badr-0.1.0/figures/experiment_1_3gr.pdf +0 -0
- badr-0.1.0/figures/experiment_2.pdf +0 -0
- badr-0.1.0/figures/figure_2.pdf +0 -0
- badr-0.1.0/figures/scalability_per_group.pdf +0 -0
- badr-0.1.0/mkdocs.yml +130 -0
- badr-0.1.0/pyproject.toml +61 -0
- badr-0.1.0/uv.lock +1320 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes to PyPI when a GitHub Release is published.
|
|
4
|
+
# Uses PyPI Trusted Publishing (OIDC) — no API token is stored in the repo.
|
|
5
|
+
# One-time setup on PyPI (https://pypi.org/manage/account/publishing/):
|
|
6
|
+
# project name: badr
|
|
7
|
+
# owner: AdaptiveDecisionMakingGroup
|
|
8
|
+
# repository: badr
|
|
9
|
+
# workflow: release.yml
|
|
10
|
+
# environment: pypi
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
release:
|
|
14
|
+
types: [published]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
name: Build distribution
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
- name: Build sdist and wheel
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade build
|
|
28
|
+
python -m build
|
|
29
|
+
- name: Check metadata
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade twine
|
|
32
|
+
python -m twine check dist/*
|
|
33
|
+
- uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: dist
|
|
36
|
+
path: dist/
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
name: Publish to PyPI
|
|
40
|
+
needs: build
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
environment:
|
|
43
|
+
name: pypi
|
|
44
|
+
url: https://pypi.org/project/badr/
|
|
45
|
+
permissions:
|
|
46
|
+
id-token: write # required for Trusted Publishing
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/download-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: dist
|
|
51
|
+
path: dist/
|
|
52
|
+
- name: Publish
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
badr-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# Virtual env
|
|
30
|
+
.venv
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Read the Docs build configuration
|
|
2
|
+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
3
|
+
version: 2
|
|
4
|
+
|
|
5
|
+
build:
|
|
6
|
+
os: ubuntu-24.04
|
|
7
|
+
tools:
|
|
8
|
+
python: "3.11"
|
|
9
|
+
|
|
10
|
+
# Build the MkDocs site from the project's mkdocs.yml
|
|
11
|
+
mkdocs:
|
|
12
|
+
configuration: mkdocs.yml
|
|
13
|
+
|
|
14
|
+
python:
|
|
15
|
+
install:
|
|
16
|
+
# MkDocs + Material theme + mkdocstrings
|
|
17
|
+
- requirements: docs/requirements.txt
|
|
18
|
+
# Install badr itself so mkdocstrings can import it for the API reference
|
|
19
|
+
- method: pip
|
|
20
|
+
path: .
|