reject

Classification with rejection in Python.

https://github.com/arthur-thuy/reject

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Classification with rejection in Python.

Basic Info
  • Host: GitHub
  • Owner: arthur-thuy
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://reject.readthedocs.io
  • Size: 1.87 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 5
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

PyPI Documentation Status DOI

reject is a Python library for classification with rejection. Neural networks are often confidently wrong when confronted with out-of-distribution data. When the prediction's uncertainty is too high, the model abstains from predicting and the observation is passed on to a human expert who takes the final decision. It is useful for applications where making an error can be more costly than asking a human expert for help.

Installation

bash $ pip install reject

Documentation

The documentation is deployed to reject.readthedocs.io.

Usage

```python from reject.reject import ClassificationRejector

ypred # Array of predictions. Shape (nobservations, nclasses) or (nobservations, nsamples, nclasses). ytrue # Array of true labels. Shape (nobservations,).

initialize the rejector

rej = ClassificationRejector(ytrueall, ypredall) python

single rejection point

rej.reject(threshold=0.5, unc_type="TU", relative=True, show=True) bash Non-rejected Rejected


Correct 891 20 Incorrect 109 980

Non-rejected accuracy Classification quality Rejection quality


             0.8910                    0.9355              40.9908

```

```python

rejection curve

fig = rej.plotreject(unctype="TU", metric="NRA") print(fig) ```

User guide notebooks are provided in the reject.readthedocs.io documentation.

Owner

  • Name: Arthur Thuy
  • Login: arthur-thuy
  • Kind: user

PhD Researcher at Ghent University

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Reject
message: >-
  If you use reject in your work, please cite it using the
  following metadata
type: software
authors:
  - given-names: Arthur
    family-names: Thuy
    email: arthur.thuy@ugent.be
    affiliation: Ghent University
    orcid: 'https://orcid.org/0000-0001-9107-5646'
  - given-names: Dries F.
    family-names: Benoit
    email: dries.benoit@ugent.be
    affiliation: Ghent University
    orcid: 'https://orcid.org/0000-0001-9901-8507'
identifiers:
  - type: doi
    value: 10.5281/zenodo.10796209
    description: >-
      The concept DOI for the collection containing all
      versions of the Citation File Format.
repository-code: 'https://github.com/arthur-thuy/reject'
url: 'https://reject.readthedocs.io/en/latest/'
abstract: Classification with rejection in Python
keywords:
  - python
  - machine learning
  - uncertainty
  - diversity
  - neural networks
license: Apache-2.0
version: 0.3.1
date-released: '2024-03-08'

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: reject

Classification with rejection in Python.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Dependent packages count: 9.9%
Average: 37.5%
Dependent repos count: 65.1%
Maintainers (1)
Last synced: 10 months ago