A classifier that endeavors to solve the saddle point problem for AUC maximization.
Project description
CalfMilp
CalfMilp is a binomial classifier that implements a course approximation linear function by mixed integer linear programming.
Contact
Rolf Carlson hrolfrc@gmail.com
Install
Use pip to install calf-milp.
pip install calf-milp
Introduction
CalfMilp provides classification and prediction for two classes, the binomial case. Small problems are supported. This is research code and a work in progress.
CalfMilp is designed for use with scikit-learn pipelines and composite estimators.
Example
from calf_milp import CalfMilp
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 = CalfMilp().fit(X_train, y_train)
Get the score on unseen data
cls.score(X_test, y_test)
0.875
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
calf_milp-0.1.4.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for calf_milp-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69548f1673cf4b44572273a396e7aa7578860575fe607a36452241ec42564817 |
|
MD5 | 8f8fca6b84f4e46ecf2f8c1b49b204d7 |
|
BLAKE2b-256 | dc87a1ed7f9a83483c536ff4f6a9896e5fd280a75aa6944ee23e0c12bf7c890f |