Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abess

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abess

abess: Fast Best Subset Selection

  • 0.4.8
  • PyPI
  • Socket score

Maintainers
3

|logopic|

.. |logopic| image:: https://github.com/abess-team/abess/raw/master/docs/image/icon_long.png

|Python build status| |R build status| |codecov| |docs| |cran| |pypi| |conda-forge| |pyversions| |License| |Codacy| |CodeFactor| |Platform| |Downloads|

.. |Codacy| image:: https://app.codacy.com/project/badge/Grade/3f6e60a3a3e44699a033159633981b76 :target: https://www.codacy.com/gh/abess-team/abess/dashboard?utm_source=github.com&utm_medium=referral&utm_content=abess-team/abess&utm_campaign=Badge_Grade .. |Travis build status| image:: https://travis-ci.com/abess-team/abess.svg?branch=master :target: https://travis-ci.com/abess-team/abess .. |Python build status| image:: https://github.com/abess-team/abess/actions/workflows/python_test.yml/badge.svg?branch=master :target: https://github.com/abess-team/abess/actions/workflows/python_test.yml .. |R build status| image:: https://github.com/abess-team/abess/actions/workflows/r_test.yml/badge.svg?branch=master :target: https://github.com/abess-team/abess/actions/workflows/r_test.yml .. |codecov| image:: https://codecov.io/gh/abess-team/abess/branch/master/graph/badge.svg?token=LK56LHXV00 :target: https://codecov.io/gh/abess-team/abess .. |docs| image:: https://readthedocs.org/projects/abess/badge/?version=latest :target: https://abess.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. |R website| image:: https://github.com/abess-team/abess/actions/workflows/r_website.yml :target: https://abess-team.github.io/abess/ .. |cran| image:: https://img.shields.io/cran/v/abess?logo=R :target: https://cran.r-project.org/package=abess .. |pypi| image:: https://img.shields.io/pypi/v/abess?logo=Pypi :target: https://pypi.org/project/abess .. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/abess.svg?logo=condaforge :target: https://anaconda.org/conda-forge/abess .. |pyversions| image:: https://img.shields.io/pypi/pyversions/abess .. |License| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg :target: http://www.gnu.org/licenses/gpl-3.0 .. |CodeFactor| image:: https://www.codefactor.io/repository/github/abess-team/abess/badge :target: https://www.codefactor.io/repository/github/abess-team/abess .. |Platform| image:: https://anaconda.org/conda-forge/abess/badges/platforms.svg :target: https://anaconda.org/conda-forge/abess .. |Downloads| image:: https://pepy.tech/badge/abess :target: https://pepy.tech/project/abess

Overview

abess (Adaptive BEst Subset Selection) library aims to solve general best subset selection, i.e., find a small subset of predictors such that the resulting model is expected to have the highest accuracy. The selection for best subset shows great value in scientific researches and practical application. For example, clinicians wants to know whether a patient is health or not
based on the expression level of a few of important genes.

This library implements a generic algorithm framework to find the optimal solution in an extremely fast way [#1abess]. This framework now supports the detection of best subset under: linear regression, (multi-class) classification, censored-response modeling [#4sksurv], multi-response modeling (a.k.a. multi-tasks learning), etc. It also supports the variants of best subset selection like group best subset selection_ [#2gbes]_ and nuisance best subset selection_ [#3nbes]. Especially, the time complexity of (group) best subset selection for linear regression is certifiably polynomial [#1abess] [#2gbes]_.

.. _linear regression: https://abess.readthedocs.io/en/latest/auto_gallery/1-glm/plot_1_LinearRegression.html .. _(multi-class) classification: https://abess.readthedocs.io/en/latest/auto_gallery/1-glm/plot_2_LogisticRegression.html .. _counting-response modeling: https://abess.readthedocs.io/en/latest/auto_gallery/1-glm/plot_5_PossionGammaRegression.html .. _censored-response modeling: https://abess.readthedocs.io/en/latest/auto_gallery/1-glm/plot_4_CoxRegression.html#sphx-glr-auto-gallery-1-glm-plot-4-coxregression-py .. _multi-response modeling (a.k.a. multi-tasks learning): https://abess.readthedocs.io/en/latest/auto_gallery/1-glm/plot_3_MultiTaskLearning.html .. _group best subset selection: https://abess.readthedocs.io/en/latest/auto_gallery/3-advanced-features/plot_best_group.html .. _nuisance best subset selection: https://abess.readthedocs.io/en/latest/auto_gallery/3-advanced-features/plot_best_nuisance.html

Quick start

Install the stable abess Python package from Pypi:

.. code-block:: shell

$ pip install abess

Best subset selection for linear regression on a simulated dataset in Python:

.. code-block:: python

from abess.linear import LinearRegression from abess.datasets import make_glm_data sim_dat = make_glm_data(n = 300, p = 1000, k = 10, family = "gaussian") model = LinearRegression() model.fit(sim_dat.x, sim_dat.y)

See more examples analyzed with Python in the tutorials; the notebooks are available here <https://abess.readthedocs.io/en/latest/Tutorial/index.html>_.

Runtime Performance

To show the power of abess in computation, we assess its timings of the CPU execution (seconds) on synthetic datasets, and compare to state-of-the-art variable selection methods. The variable selection and estimation results are deferred to performance_.

.. _performance: https://abess.readthedocs.io/en/latest/Tutorial/power_of_abess.html

We compare abess Python package with scikit-learn on linear and logistic regression. Results are presented in the below figure, and can be reproduce by running the commands in shell:

.. code-block:: shell

$ python ./simulation/Python/timings.py

we obtain the runtime comparison picture:

|pic1|

.. |pic1| image:: https://github.com/abess-team/abess/raw/master/docs/image/timings.png :width: 100%

abess reaches a high efficient performance especially in linear regression where it gives the fastest solution.

Open source software

abess is a free software and its source code are publicly available in Github.
The core framework is programmed in C++, and user-friendly R and Python interfaces are offered. You can redistribute it and/or modify it under the terms of the GPL-v3 License
. We welcome contributions for abess, especially stretching abess to the other best subset selection problems.

.. _github: https://github.com/abess-team/abess .. _GPL-v3 License: https://www.gnu.org/licenses/gpl-3.0.html

Citation

If you use abess or reference our tutorials in a presentation or publication, we would appreciate citations of our library [#5abesslib]_.

| Jin Zhu, Liyuan Hu, Junhao Huang, Kangkang Jiang, Yanhang Zhang, Shiyun Lin, Junxian Zhu, Xueqin Wang (2022). “abess: A Fast Best Subset Selection Library in Python and R.” Journal of Machine Learning Research (Accepted).

The corresponding BibteX entry:

.. code-block:: shell

@article{zhu2022abess, author = {Jin Zhu and Liyuan Hu and Junhao Huang and Kangkang Jiang and Yanhang Zhang and Shiyun Lin and Junxian Zhu and Xueqin Wang}, title = {abess: A Fast Best Subset Selection Library in Python and R}, journal = {Journal of Machine Learning Research (Accepted)}, year = {2022} }

References

.. [#1abess] Junxian Zhu, Canhong Wen, Jin Zhu, Heping Zhang, and Xueqin Wang (2020). A polynomial algorithm for best-subset selection problem. Proceedings of the National Academy of Sciences, 117(52):33117-33123.

.. [#4sksurv] Pölsterl, S (2020). scikit-survival: A Library for Time-to-Event Analysis Built on Top of scikit-learn. J. Mach. Learn. Res., 21(212), 1-6.

.. [#2gbes] Yanhang Zhang, Junxian Zhu, Jin Zhu, and Xueqin Wang (2022). A Splicing Approach to Best Subset of Groups Selection. INFORMS Journal on Computing (Accepted). doi:10.1287/ijoc.2022.1241.

.. [#3nbes] Qiang Sun and Heping Zhang (2020). Targeted Inference Involving High-Dimensional Data Using Nuisance Penalized Regression, Journal of the American Statistical Association, DOI: 10.1080/01621459.2020.1737079.

.. [#5abesslib] Zhu Jin, Xueqin Wang, Liyuan Hu, Junhao Huang, Kangkang Jiang, Yanhang Zhang, Shiyun Lin, and Junxian Zhu. "abess: A Fast Best-Subset Selection Library in Python and R." Journal of Machine Learning Research 23, no. 202 (2022): 1-7.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc