Skip to main content

Tensorflow implementation of the Importance Cross Entropy Loss function pruposed on this paper: https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Niu_Ordinal_Regression_With_CVPR_2016_paper.pdf. Custom metrics were built for MAPE, MAE, and Accuracy. Two loss functions were create one that includes the lambda calculation and one that doesn't. (repository author: Pedro Jose Carrinho Ribeiro; pedro-carrinho@hotmail.com pedro.carrinho @inl.com).

Project description

importance_cross_entropy

Tensorflow implementation of the Importance Cross Entropy Loss function pruposed on this paper: https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Niu_Ordinal_Regression_With_CVPR_2016_paper.pdf. No label converssion is required. Additionally custom built metrics were create for the calculation of Mean Absolute percentage error, Mean Absolute error, and Accuracy. Two loss functions were create one that includes the lambda calculation and one that doesn't. (repository author: Pedro José Carrinho Ribeiro; pedro-carrinho@hotmail.com pedro.carrinho @inl.com).

Requirements

You can just use the function directly if you have tensorflow already. You can also do:

pip install importance_cross_entropy

or:

pip install -r requirements.txt

Project Organization

├── LICENSE            <- Open-source license if one is chosen
│
├── Makefile           <- Makefile with convenience commands
│
├── README.md          <- The top-level README for developers using this project.
│
├── pyproject.toml     <- Project configuration file with package metadata for 
│                         importance_cross_entropy and configuration for tools like black
│
├── references         <- Paper used for the implementation.
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
│                         generated with `pip freeze > requirements.txt`
│
└── importance_cross_entropy   <- Source code for use in this project.
    │
    ├── __init__.py             <- Makes importance_cross_entropy a Python module
    │
    ├── loss.py                 <- Code for the loss functions and lambda calculation
    │
    └── metrics.py              <- Code for the metrics calculation for monitoring train and testing

Acknowledgements

Cite the original paper if you wish: https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Niu_Ordinal_Regression_With_CVPR_2016_paper.pdf.

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

importance_cross_entropy-0.0.1.tar.gz (439.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

importance_cross_entropy-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file importance_cross_entropy-0.0.1.tar.gz.

File metadata

File hashes

Hashes for importance_cross_entropy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 526e48f9952b0c948aed1ea043b7bd705a0a0b295ea9f43c2bd0b07851be2e06
MD5 5e0b2ae483a76f3c8c61ea0ba67e2f2e
BLAKE2b-256 fd99c32159c2980a7fd529b897dffbc6cd7e1e6487bbbd6ecaa6bf89ac375855

See more details on using hashes here.

File details

Details for the file importance_cross_entropy-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for importance_cross_entropy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97a13610eac4b230fc2511b10ba66cce9f39fb1802d40e622b342120142e3e37
MD5 5a300d74ee2b647c4928ff5206a02869
BLAKE2b-256 2687232d0e075a1996f509146f6c5fa86a29194f6606041a6db314cc9b8318db

See more details on using hashes here.

Supported by

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