Bridging the Gap: Unifying the Training and Evaluation of Neural Network Binary Classifiers
Project description
Bridging the Gap: Unifying the Training and Evaluation of Neural Network Binary Classifiers
A PyTorch implementation of Bridging the Gap (BtG) losses including F-beta (F1), Accuracy, and AUROC.
Project Webpage: btg.yale.edu
Citation:
@inproceedings{tsoi2022bridging,
title = {Bridging the Gap: Unifying the Training and Evaluation of Neural Network Binary Classifiers},
author = {Tsoi, Nathan and Candon, Kate and Li, Deyuan and Milkessa, Yofti and V{\'a}zquez, Marynel},
booktitle = {Advances in Neural Information Processing Systems},
year = {2022}
}
Usage
Install the torch-btg
package:
pip install torch-btg
Use the desired loss in your code, for example,
F1-loss
:
from torch_btg.loss import f1_loss
...
criterion = fb_loss(beta=1.0)
...
Accuracy loss
:
from torch_btg.loss import accuracy_loss
...
criterion = accuracy_loss()
...
Development
Setup
python -m pip install --user tox
Then run tests with:
tox
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
torch_btg-0.0.1.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file torch_btg-0.0.1.tar.gz
.
File metadata
- Download URL: torch_btg-0.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63896f785664c93f771dcd249e45727cf99f0662cd5dc8b59bd4c0edd597aff7 |
|
MD5 | 0f8bc36143ade88eb1cc40f36a1fc88d |
|
BLAKE2b-256 | 2c773fedc254a39c95369d62e856c40428bfbfc5033d33dc3f8982c1208ffe56 |
File details
Details for the file torch_btg-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: torch_btg-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc925e8c43a98478731f53dcc90e488a1c4e312e00cfca9f1deff8a0fef335a |
|
MD5 | 6eff4dc163d4a5fc8522b3b95ced4869 |
|
BLAKE2b-256 | 1c12c74df393b3c9a9fef771f81b8a878687761e7bad85576188765725c4ab83 |