Skip to main content

BP-MLL loss function for tensorflow

Project description

bp-mll-tensorflow

Efficient (vectorized) implementation of the BP-MLL loss function in TensorFlow (bp_mll.py).

BP-MLL is a loss function designed for multi-label classification using neural networks. It was introduced by Zhang & Zhou in [1]. Note that in line with [1], every sample needs to have at least one label and no sample may have all labels.

Installation

pip3 install bpmll

Usage

from bpmll import bp_mll_loss

Then simply use it as a function in your tensorflow or keras models.

Check out full_example.py for an example of training a simple multilayer perceptron using Keras with BP-MLL.

References

[1] Zhang, Min-Ling, and Zhi-Hua Zhou. "Multilabel neural networks with applications to functional genomics and text categorization." IEEE transactions on Knowledge and Data Engineering 18.10 (2006): 1338-1351.

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

bpmll-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

bpmll-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file bpmll-1.0.0.tar.gz.

File metadata

  • Download URL: bpmll-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.2

File hashes

Hashes for bpmll-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3bfae3aeb34344fe0ae8aa7195ac75ee5a707d3f3b3246c085cf83326b2df062
MD5 2cc5bce33dddda1a0d6c66364d7dd1b2
BLAKE2b-256 88f75f72082d6902ffc20173d0853fabd1ddeb794590a2af9050aac363466e85

See more details on using hashes here.

File details

Details for the file bpmll-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bpmll-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.2

File hashes

Hashes for bpmll-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b614e678f9f7e4c30d6e9777edc0e0b2f0500f5820a5fb70306b892c38a2336
MD5 508938809385a1792feaa9b07156fa88
BLAKE2b-256 05b400504fabaefeaab0e22acf01638a8824ded6287d514b003cf8249dac555c

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