Skip to main content

CONDOR pytorch implementation for ordinal regression with deep neural networks.

Continuous Integration License Python 3


Documentation: https://GarrettJenkinson.github.io/condor_pytorch


About

CONDOR, short for CONDitionals for Ordinal Regression, is a method for ordinal regression with deep neural networks, which addresses the rank inconsistency issue of other ordinal regression frameworks.

It is compatible with any state-of-the-art deep neural network architecture, requiring only modification of the output layer, the labels, the loss function.

This repository implements the CONDOR functionality (neural network layer, loss function, and dataset utilities) for convenient use. Examples are provided via the "Tutorials" that can be found on the documentation website at https://GarrettJenkinson.github.io/condor_pytorch.

We also have CONDOR implemented for Tensorflow.


Installation or Docker


You can install the latest stable release of condor_pytorch directly from Python's package index via pip by executing the following code from your command line:

pip install condor-pytorch

The dependencies can also be pip installed also using the included requirements.txt:

pip install -r requirements.txt

We also provide Dockerfile's to help get up and started quickly with condor_pytorch. The cpu image can be built and ran as follows, with tutorial jupyter notebooks built in.

# Create a docker image, only done once
docker build -t cpu_pytorch -f cpu.Dockerfile ./

# run image to serve a jupyter notebook
docker run -it -p 8888:8888 --rm cpu_pytorch

# how to run bash inside container (with python that will have deps)
docker run -u $(id -u):$(id -g) -it -p 8888:8888 --rm cpu_pytorch bash

An NVIDIA based gpu optimized container can be built and run as follows (without interactive ipynb capabilities).

# only needs to be built once
docker build -t gpu_pytorch -f gpu.Dockerfile ./

# use the image after building it
docker run -it -p 8888:8888 --rm gpu_pytorch

Cite as

If you use CONDOR as part of your workflow in a scientific publication, please consider citing the CONDOR repository with the following DOI:

@article{condor2021,
title = "Universally rank consistent ordinal regression in neural networks",
journal = "arXiv",
volume = "2110.07470",
year = "2021",
url = "https://arxiv.org/abs/2110.07470",
author = "Garrett Jenkinson and Kia Khezeli and Gavin R. Oliver and John Kalantari and Eric W. Klee",
keywords = "Deep learning, Ordinal regression, neural networks, Machine learning, Biometrics"
}

Acknowledgments: Many thanks to the CORAL ordinal authors and the CORAL pytorch authors whose repos provided a roadmap for this codebase.

Metadata

Release files for condor-pytorch 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for condor-pytorch 1.1.0
File Size Uploaded Provenance
condor_pytorch-1.1.0.tar.gz 12.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for condor-pytorch 1.1.0
File Interpreter ABI Platform
condor_pytorch-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.0 kB

Release files / condor_pytorch-1.1.0.tar.gz

Download URL condor_pytorch-1.1.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd76af6bb3bd4cf850af05713d7c0ebf97ae4756375c9b4fd8e2bb6907612a2c
BLAKE2b-256 checksum
How to use checksums
4c4ff13a6ed16290e2800b46139114b925386e63efd3d7d8356094b317c95032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / condor_pytorch-1.1.0-py3-none-any.whl

Download URL condor_pytorch-1.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
785f6994c911d10a5a9b8dccea691a43d26ea9b38057ff4b7e015bc5be915c08
BLAKE2b-256 checksum
How to use checksums
34a4948f41d05b3e840e152d41fac8b4cad5586a000d83684dae6ec8957058bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Security for condor-pytorch 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page