a13n
Build AI agents and run them on cloud.
Peer-reviewed variants of classic estimators that never made it into scikit-learn, with the scikit-learn API and a public benchmark gate.
Developer toolsPythonGitHub @OliverHennhoeferOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Peer-reviewed and proven variants of classic ML models that never made it into scikit-learn.
Taken from the repository README
Loading the full README.
Read the full README ↗Naive Bayes, LDA, k-NN, CART, random forests, AdaBoost, the lasso, logistic regression and Isolation Forest are the workhorses of applied machine learning. The literature has published variants of each that fix a known weakness and compared them carefully with the original, but most never reached a mainstream Python library. aspective collects them.
check_estimator,
so pipelines, grid search and cross-validation just work. Anomaly
detectors follow PyOD's BaseDetector contract.pip install aspective # classifiers and regressors
pip install "aspective[pyod]" # detectors then subclass PyOD's BaseDetector
The anomaly detectors work without PyOD through a small stand-in base class with the same contract. With PyOD installed they are genuine PyOD detectors and work inside PyOD's ensembles (LSCP, SUOD), thresholding and benchmarks.
from sklearn.datasets import load_wine
from sklearn.model_selection import GridSearchCV
from aspective.discriminant_analysis import RegularizedDiscriminantAnalysis
X, y = load_wine(return_X_y=True)
search = GridSearchCV(
RegularizedDiscriminantAnalysis(),
{"lam": [0, 0.25, 0.5, 0.75, 1], "gamma": [0, 0.1, 0.5]},
).fit(X, y)
from aspective.anomaly import RSHashDetector
detector = RSHashDetector(contamination=0.05, random_state=0).fit(X)
detector.decision_scores_ # higher means more anomalous
detector.predict(X) # 0 inlier, 1 outlier, as in PyOD
Start from the model you already use; the guide says which variant helps when.
| Estimator | Improves on | Paper |
|---|---|---|
discriminant_analysis.RegularizedDiscriminantAnalysis | LDA, QDA | Friedman, JASA 1989 |
discriminant_analysis.MixtureDiscriminantAnalysis | LDA | Hastie & Tibshirani, JRSS-B 1996 |
naive_bayes.AODEClassifier | Naive Bayes | Webb, Boughton & Wang, Machine Learning 2005 |
naive_bayes.A2DEClassifier | Naive Bayes | Webb, Boughton, Zheng, Ting & Salem, Machine Learning 2012 |
naive_bayes.TANClassifier | Naive Bayes | Friedman, Geiger & Goldszmidt, Machine Learning 1997 |
naive_bayes.KDBClassifier | Naive Bayes | Sahami, KDD 1996 |
naive_bayes.HiddenNaiveBayesClassifier | Naive Bayes | Zhang, Jiang & Su, AAAI 2005 |
naive_bayes.FlexibleNaiveBayes | Gaussian naive Bayes | John & Langley, UAI 1995 |
neighbors.DANNClassifier | k-NN classification | Hastie & Tibshirani, IEEE TPAMI 1996 |
neighbors.LoessRegressor | k-NN regression | Cleveland & Devlin, JASA 1988 |
ensemble.RotationForestClassifier | Random forest | Rodríguez, Kuncheva & Alonso, IEEE TPAMI 2006 |
ensemble.LogitBoostClassifier | AdaBoost | Friedman, Hastie & Tibshirani, Annals of Statistics 2000 |
ensemble.MultiBoostClassifier | AdaBoost | Webb, Machine Learning 2000 |
ensemble.LocalLinearForestRegressor | Random forest | Friedberg, Tibshirani, Athey & Wager, JCGS 2020 |
tree.M5ModelTreeRegressor | Regression tree (CART) | Quinlan 1992; Wang & Witten, ECML 1997 |
linear_model.FirthLogisticRegression | Logistic regression | Firth, Biometrika 1993; Puhr et al., Statistics in Medicine 2017 (FLIC/FLAC) |
linear_model.CauchyLogisticRegression | Logistic regression |
If you use aspective, please cite it via CITATION.cff (or
GitHub's "Cite this repository" button) and the original paper of each
estimator you use.
Proposals for new estimators are welcome: open an estimator proposal. See CONTRIBUTING.md for the bar an estimator has to clear and the development setup:
uv sync --extra pyod # package, tests and the bench/ testbed
uv run pytest # unit tests and the benchmark gate check
uv run aspective-bench run my-model # benchmark a model, see bench/README.md
| Gelman, Jakulin, Pittau & Su, Annals of Applied Statistics 2008 |
linear_model.RelaxedLasso, RelaxedLassoCV | Lasso | Meinshausen, CSDA 2007 |
linear_model.AdaptiveLasso, AdaptiveLassoCV | Lasso | Zou, JASA 2006 |
linear_model.NonconvexPenaltyRegression, NonconvexPenaltyRegressionCV (MCP, SCAD) | Lasso | Zhang, Annals of Statistics 2010; Fan & Li, JASA 2001 |
linear_model.Bolasso | Lasso (variable selection) | Bach, ICML 2008 |
linear_model.L2BoostRegressor | Lasso | Bühlmann & Yu, JASA 2003; Bühlmann, Annals of Statistics 2006 |
linear_model.MARSRegressor | Linear regression, CART | Friedman, Annals of Statistics 1991 |
linear_model.PSplineGAMRegressor | Linear regression | Hastie & Tibshirani, Statistical Science 1986; Eilers & Marx, Statistical Science 1996 |
anomaly.RSHashDetector | Isolation Forest, subspace detectors | Sathe & Aggarwal, ICDM 2016 |
anomaly.LeSiNNDetector | Isolation Forest, k-NN detector | Pang, Ting & Albrecht, ICDM Workshops 2015 |
anomaly.ExtendedIsolationForestDetector | Isolation Forest | Hariri, Carrasco Kind & Brunner, IEEE TKDE 2021 |