Registry / ai-ml / sppam
library0.1.10pypypiunverified

A Python library for AUC maximization via a saddle point problem classifier. Current version: 0.1.10, early development stage with occasional releases.

pip install sppam
INSTALL
IMPORT
SIG · SPPAM
S
sppam
ai-mlpythonv0.1.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SPPAM
import sppam
from sppam import SPPAM

Train an SPPAM classifier on imbalanced synthetic data and evaluate AUC.

from sppam import SPPAM from sklearn.datasets import make_classification from sklearn.model_selection import train_test_split X, y = make_classification(n_samples=200, weights=[0.9, 0.1], random_state=42) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42) clf = SPPAM() clf.fit(X_train, y_train) score = clf.score(X_test, y_test) print(f'AUC: {score:.3f}')
Debug
Known issues
gotchaThe SPPAM classifier expects binary labels in {0,1} or {-1,1}. Using continuous or multi-class labels will lead to errors or incorrect results.
fix
Ensure target is binary and properly encoded: y = (y == 1).astype(int) or use LabelEncoder.
affects: all
breakingVersion 0.1.0 changed the default hyperparameters (lambda_reg, learning_rate) from previous alpha releases. Older code relying on defaults may behave differently.
fix
Explicitly set parameters if migrating from earlier versions. Check release notes for defaults.
affects: <0.1.0 to 0.1.0+
gotchaThe fit() method does not shuffle the data automatically. If data is ordered, performance may degrade. Manual shuffling is recommended.
fix
Shuffle data before calling fit: X, y = shuffle(X, y, random_state=0).
affects: all
Upgrade
Version history
0.1.10latest on PyPI
Audit
Dependencies
numpyrequiredRequired for array operations and matrix computations.
scipyrequiredUsed for optimization routines and linear algebra.
scikit-learnoptionalProvides train-test split utilities and metric functions.
Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
1
Resources
sppam — pip install sppam · libregistry