{"id":28254,"library":"sppam","title":"sppam","description":"A Python library for AUC maximization via a saddle point problem classifier. Current version: 0.1.10, early development stage with occasional releases.","status":"active","version":"0.1.10","language":"python","source_language":"en","source_url":"https://github.com/hrolfrc/sppam","tags":["machine-learning","auc-maximization","imbalanced-learning","classifier"],"install":[{"cmd":"pip install sppam","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required for array operations and matrix computations.","package":"numpy","optional":false},{"reason":"Used for optimization routines and linear algebra.","package":"scipy","optional":false},{"reason":"Provides train-test split utilities and metric functions.","package":"scikit-learn","optional":true}],"imports":[{"note":"Common mistake due to package structure; top-level import is correct.","wrong":"from sppam.sppam import SPPAM","symbol":"SPPAM","correct":"from sppam import SPPAM"}],"quickstart":{"code":"from sppam import SPPAM\nfrom sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\n\nX, y = make_classification(n_samples=200, weights=[0.9, 0.1], random_state=42)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)\n\nclf = SPPAM()\nclf.fit(X_train, y_train)\nscore = clf.score(X_test, y_test)\nprint(f'AUC: {score:.3f}')","lang":"python","description":"Train an SPPAM classifier on imbalanced synthetic data and evaluate AUC."},"warnings":[{"fix":"Ensure target is binary and properly encoded: y = (y == 1).astype(int) or use LabelEncoder.","message":"The SPPAM classifier expects binary labels in {0,1} or {-1,1}. Using continuous or multi-class labels will lead to errors or incorrect results.","severity":"gotcha","affected_versions":"all"},{"fix":"Explicitly set parameters if migrating from earlier versions. Check release notes for defaults.","message":"Version 0.1.0 changed the default hyperparameters (lambda_reg, learning_rate) from previous alpha releases. Older code relying on defaults may behave differently.","severity":"breaking","affected_versions":"<0.1.0 to 0.1.0+"},{"fix":"Shuffle data before calling fit: X, y = shuffle(X, y, random_state=0).","message":"The fit() method does not shuffle the data automatically. If data is ordered, performance may degrade. Manual shuffling is recommended.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Ensure the same preprocessing (e.g., feature selection) is applied to both training and test sets.","cause":"Inconsistent feature dimensions between fit and predict.","error":"ValueError: X has 10 features, but SPPAM is expecting 5 features as input."},{"fix":"Install sppam: pip install sppam. Use correct import: from sppam import SPPAM.","cause":"Incorrect import path or package not installed.","error":"ImportError: cannot import name 'SPPAM' from 'sppam'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}