Skip to main content

TF.Keras implementation of CORAL ordinal classification output layer

Project description

CORAL ordinal classification in tf.keras

Tensorflow Keras implementation of ordinal classification using CORAL by Cao et al. (2019), with thanks to Sebastian Raschka for the help in porting from PyTorch. This package includes an ordinal output layer and an associated loss function.

This is a work in progress, so please post any issues to the issue queue.

Source repository for the original PyTorch implementation.

Key pending items:

  • Function docstrings
  • Docs
  • Tests
  • Custom metrics: accuracy, cross-entropy, mean absolute error of labels

Installation

Install the stable version via pip:

pip install coral-ordinal

Install the most recent code on GitHub via pip:

pip install git+https://github.com/ck37/coral-ordinal/

Dependencies

This package relies on Python 3.6+, Tensorflow 2.2+, numpy, pandas, and scipy.

Example

See this colab notebook for an example of using an ordinal output layer with MNIST.

References

Cao, W., Mirjalili, V., & Raschka, S. (2019). Consistent rank logits for ordinal regression with convolutional neural networks. arXiv preprint arXiv:1901.07884, 6.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coral-ordinal-0.1.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

coral_ordinal-0.1.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file coral-ordinal-0.1.3.tar.gz.

File metadata

  • Download URL: coral-ordinal-0.1.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for coral-ordinal-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3b8c31f785f965c712d5b4d41e504585eaf7952e88e553689de5d9798e35b9c0
MD5 fca1a181f84c30f4f9a9abc6d32a379e
BLAKE2b-256 7f2b93dbd066085e9bf45fc2b8eaf4b30c842be74246e3f2ac6f222528d5a4d6

See more details on using hashes here.

File details

Details for the file coral_ordinal-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: coral_ordinal-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for coral_ordinal-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0678d5b5433faf4a5d25012fb514e857c4c554c399158e4d0e9d9877fce2bfaa
MD5 be96441a12a278d92cefc7d45919b88e
BLAKE2b-256 1092140623cc5c32412d892c65c5c62de9171713b74d2ca5bf578c75e24ee999

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page