A classifier that maximizes AUC
Project description
ScoreRegression - A classifier that maximizes AUC
An AUC optimizing binomial classifier.
Contact
Rolf Carlson hrolfrc@gmail.com
Install
Use pip to install score_regression.
pip install score-regression
Introduction
This is a python implementation of a classifier that maximizes AUC. The idea is to find the features that maximize AUC, analogous to CALF, but relax the requirement that the weights be integers in [-1, 0, 1] and instead allow the weights to be any real number.
ScoreRegression 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.
ScoreRegression is designed for use with scikit-learn pipelines and composite estimators.
Example
from score_regression import ScoreRegression
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 = ScoreRegression().fit(X_train, y_train)
Get the score on unseen data
cls.score(X_test, y_test)
1.0
References
[1] Jeffries, C.D., Ford, J.R., Tilson, J.L. et al. A greedy regression algorithm with coarse weights offers novel advantages. Sci Rep 12, 5440 (2022). https://doi.org/10.1038/s41598-022-09415-2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file score_regression-0.0.23.tar.gz
.
File metadata
- Download URL: score_regression-0.0.23.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f2957e48c7147850f816f8baf5615193853180f39b81d363b0f91b00a0bc930 |
|
MD5 | 77033ea025fd6b73f9e310c3879f3323 |
|
BLAKE2b-256 | a1746b8227b527bdf12cef03d74e94df0ba639c6ae475ce97bacc83a07dcbf10 |
File details
Details for the file score_regression-0.0.23-py3-none-any.whl
.
File metadata
- Download URL: score_regression-0.0.23-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b374fc9f06fb5be0d20051905372ed634039ec055ffa4d3be461e431a8fb0f1 |
|
MD5 | 7d315192f294370654db26d76b35fb9b |
|
BLAKE2b-256 | bb024e0acb4140b7ccc17025d90d81fd0af8cd24774f92e649748c5cede243f5 |