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

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

Uploaded Python 3

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