Skip to main content

AUC optimization

Project description

LibAUC

An end-to-end machine learning library for auc optimization.

Why is LibAUC?

Deep AUC Maximization (DAM) is a paradigm for learning a deep neural network by maximizing the AUC score of the model on a dataset. There are several benefits of maximizing AUC score over minimizing the standard losses, e.g., cross-entropy.

  • In many domains, AUC score is the default metric for evaluating and comparing different methods. Directly maximizing AUC score can potentially lead to the largest improvement in the model performance.
  • Many real-world datasets are usually imbalanced . AUC is more suitable for handling imbalanced data distribution since maximizing AUC aims to rank the predication score of any positive data higher than any negative data

Original Links

How to install

$ pip install libauc

Example

  1. Download the required datasets.
  2. Run the following commands
$ python
>>> from libauc import *
>>> ...
>>> Losss = AUCMLoss(imratio=0.1)
>>> optimizer = PESG(model, a=Loss.a, b=Loss.b, alpha=Loss.alpha, lr=0.1, gamma=500, weight_decay=1e-5)
>>> ...
>>> loss = Loss(y_pred, targets)
>>> optimizer.zero_grad()
>>> loss.backward(retain_graph=True)
>>> optimizer.step()

Maintainer

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

libauc-1.0.2-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file libauc-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: libauc-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.10

File hashes

Hashes for libauc-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e9bbab08708c674de929d40e338d051442622ced30b1c080aaea069c755f3a2
MD5 3dd680ddeb85e76629911fc2f867500f
BLAKE2b-256 c7af7710f25e97de9ad9899d80b1b602b2194f49881abaae06a71e4a3ebf3d0a

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