Skip to main content

A classifier that endeavors to solve the saddle point problem for AUC maximization.

Project description

CircleCI ReadTheDocs

SPPAM

An AUC optimizing binomial classifier.

Contact

Rolf Carlson hrolfrc@gmail.com

Install

Use pip to install sppam.

pip install sppam

Introduction

This is a python implementation of a classifier that approximates the solution to the saddle point problem for AUC maximization. [1]

SPPAM provides classification and prediction for two classes, the binomial case. Small to medium problems are supported. This is research code and a work in progress.

SPPAM is designed for use with scikit-learn pipelines and composite estimators.

Example

from sppam import SPPAM
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
Make a classification problem
seed = 42
X, y = make_classification(
    n_samples=30,
    n_features=5,
    n_informative=2,
    n_redundant=2,
    n_classes=2,
    random_state=seed
)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=seed)
Train the classifier
cls = SPPAM().fit(X_train, y_train)
Get the score on unseen data
cls.score(X_test, y_test)
1.0

References

[1] Natole Jr, Michael & Ying, Yiming & Lyu, Siwei. (2019). Stochastic AUC Optimization Algorithms With Linear Convergence. Frontiers in Applied Mathematics and Statistics. 5. 10.3389/fams.2019.00030.

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

sppam-0.1.10.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

sppam-0.1.10-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file sppam-0.1.10.tar.gz.

File metadata

  • Download URL: sppam-0.1.10.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for sppam-0.1.10.tar.gz
Algorithm Hash digest
SHA256 55ffa1f6eecdbecc5979e1b85f9a53f14e7c7ea0069f1e19a0793b14961afede
MD5 adce577692a525ffe52a347149b62858
BLAKE2b-256 55fb3270c8707b5bf1eb9326c88b6aaa99c43a9c3150a4de001e5e8da1bbf10d

See more details on using hashes here.

File details

Details for the file sppam-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: sppam-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for sppam-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a0706cbaf46cdf69d864d50ca56496ad9856bcb2668b8fb333c32a9e84bf0c95
MD5 964ff73fda72de28b339b477d1a2dbfb
BLAKE2b-256 5c9830287f21fdb25a455a549c9e1db864761e1eb87cb9adb4612ce5a159d0b5

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