Skip to main content

fastSparseGAMs is a Python package that offers an efficient framework for solving L0-regularized learning problems in sparse generalized additive models (GAMs). Leveraging the L0Learn package, this package introduces two novel algorithms, namely quadratic cuts and dynamic feature ordering, to deliver faster computational speed. Additionally, it comes with a new loss function (exponential loss) for classification.

Project description

fastSparse

Introduction

fastSparseGAMs is a Python package that offers an efficient framework for solving L0-regularized learning problems in sparse generalized additive models (GAMs). Leveraging the L0Learn package, this package introduces two novel algorithms, namely quadratic cuts and dynamic feature ordering, to deliver faster computational speed. Additionally, it comes with a new loss function (exponential loss) for classification.

Package Installation

The latest version can be installed from pip as follows:

pip install fastsparsegams

Documentation

An example on how to use fastSparseGAMs is provided at this tutorial page.

fastSparseGAMs is developed upon the framework of L0Learn, featuring faster and novel algorithms implemented internally. We do not alter the external Python interface functions. Therefore, please see L0Learn's python documentation available here for the detailed API documentation. The external function usage is almost idential to L0Learn's API except replacing the module name l0learn with fastsparsegams.

Source Code and Installing from Source

Alternatively, fastSparseGAMs can be build from source

git clone --recurse-submodules https://github.com/tynanseltzer/L0Learn.git
cd python

To install, ensure the proper packages are installed from pyproject.toml build from source with the following:

pip install ".[test]"

To test, run the following command:

python -m pytest

Citing fastSparseGAMs

If you find fastSparseGAMs useful in your research, please consider citing the following papers.

Paper 1:

@inproceedings{liu2022fast,
  title={Fast Sparse Classification for Generalized Linear and Additive Models},
  author={Liu, Jiachang and Zhong, Chudi and Seltzer, Margo and Rudin, Cynthia},
  booktitle={International Conference on Artificial Intelligence and Statistics},
  pages={9304--9333},
  year={2022},
  organization={PMLR}
}

Paper 2:

@article{doi:10.1287/opre.2019.1919,
author = {Hazimeh, Hussein and Mazumder, Rahul},
title = {Fast Best Subset Selection: Coordinate Descent and Local Combinatorial Optimization Algorithms},
journal = {Operations Research},
volume = {68},
number = {5},
pages = {1517-1537},
year = {2020},
doi = {10.1287/opre.2019.1919},
URL = {https://doi.org/10.1287/opre.2019.1919},
eprint = {https://doi.org/10.1287/opre.2019.1919}
}

Paper 3:

@article{JMLR:v22:19-1049,
  author  = {Antoine Dedieu and Hussein Hazimeh and Rahul Mazumder},
  title   = {Learning Sparse Classifiers: Continuous and Mixed Integer Optimization Perspectives},
  journal = {Journal of Machine Learning Research},
  year    = {2021},
  volume  = {22},
  number  = {135},
  pages   = {1-47},
  url     = {http://jmlr.org/papers/v22/19-1049.html}
}

Paper 4:

@article{hazimeh2022l0learn,
      title={L0Learn: A Scalable Package for Sparse Learning using L0 Regularization},
      author={Hussein Hazimeh and Rahul Mazumder and Tim Nonet},
      year={2022},
      eprint={2202.04820},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fastsparsegams-0.2.0-cp312-cp312-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.12Windows x86-64

fastsparsegams-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fastsparsegams-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fastsparsegams-0.2.0-cp311-cp311-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.11Windows x86-64

fastsparsegams-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fastsparsegams-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fastsparsegams-0.2.0-cp310-cp310-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.10Windows x86-64

fastsparsegams-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

fastsparsegams-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fastsparsegams-0.2.0-cp39-cp39-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.9Windows x86-64

fastsparsegams-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

fastsparsegams-0.2.0-cp39-cp39-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

fastsparsegams-0.2.0-cp38-cp38-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.8Windows x86-64

fastsparsegams-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

fastsparsegams-0.2.0-cp38-cp38-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file fastsparsegams-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 85b1ceb695b9bfb57a2b1d7ac9e8573bf9a2eaea33c050e30c7114f368b8549b
MD5 cdd2d3068de21d8da30d004d94b0eb16
BLAKE2b-256 8c68141098ccc59826f417e2e0002084e7146c77d431eb464326bf615cbc0053

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6f9ea724acc2de8bf6f8a4f2fe900ca31e8e0af4d40d73cd9bbbd1705c803da
MD5 35b5d573cd66b6ecd6438c92fad9ffff
BLAKE2b-256 9fd5275419765b26670e4635fffc1957e2371eb40a220a899ac910ec0fbae654

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af7206a5b05fbe751076fc174c8f09ffafb0a78fad566fa9e9edcd9773f2e087
MD5 8c09d93143d7503eae05aace63ba38ba
BLAKE2b-256 a9b5fa5e1266cb3e554553f5c66d64e659b799190eba3806e4405cd6103ed81e

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c830be2612ddef1288616af6177265055e331eb0b2efb473badb41a6b7741a94
MD5 01e33814ed94df3bf9fb32186e26e26a
BLAKE2b-256 b20ce3b1c350a07ceaba55a0e020f7a2364e620df66abe77aef4b9fc7054618f

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44842b27ba6f205002e71deb69b69b35bd1ece7ca25602ab031de21f5d0058a1
MD5 fea18a6a1afa154933689b60d750f3af
BLAKE2b-256 15d01a1086e377efd944a62f11d5aee9e74723ee892397bdd95da28c0ba9716b

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89e1225de1a4c573f8da62b1c6064c19088fbad92ec2fdfecb94f10538062a36
MD5 55c1b4977bb1d36f21af9a1ddaf6e58d
BLAKE2b-256 d84dae700f2707cdeabdb7a20b54cf3b8fff4b2b1528c65e8ac44272c3bf4f50

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bea864d86a3b268b7efce3908dd2c34f53c7d4e085d4785f4b9a8f60342c2544
MD5 4aa6412e98847a6b8b0cf6637a019038
BLAKE2b-256 e6194290798767e37c7fd54c3c4ac4a3038486477089d497b307ed55f267a3f7

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f4cc1db2babd14e9682bc791f8e099cbc125e3e43b8c7d93283fbd111d07da3
MD5 cb839790a3603a782c79bc5fae8d4821
BLAKE2b-256 3efa78a236de85dc3a329cf724b3e9a858e95bd9c2a42c15020d04f272e5070b

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c73d64b876a2c45492f41f0d9f03741248298b236a36a13d2c8f43c812822e3f
MD5 de4f0d1e73ed8c95efb1b0e3dbcf15bd
BLAKE2b-256 e472f141ec00290195e3bdf926a9c74d333a83580f4ae5635593cd06272e1b43

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e671d51c4d52a6ad3c707eefb6d9aa1338edad1a3e6081a65ded13c718cec4b5
MD5 6caa71b6595596ea12bc8cacdfa3697e
BLAKE2b-256 54246e7dde7744d85c0bea763e723a9e6b5937bb456d91ee31f013f3eb8bd765

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed2e53586efbbdeb8fdcbb013e6cc8180bccb3a3eaa37a11492203da0af79c5a
MD5 cd4bfc8e224860970092e577112f3ade
BLAKE2b-256 e20b1bb4737ff6caac90c5dcf248c82ccef57fe8dd5ced18a66e69288a48332f

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08cf1abc6ec82b1879debfdcddfce3cd6474286fc53ec0f7b5fdecca2084e745
MD5 145f07045bef3b6dafd66bdd467496be
BLAKE2b-256 c6fa67fa914acd03d8d518a056749fed2ff8ba7c9d3b4f782700e311bfb36697

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 738dae75060f29faa69d64472b4ae0ec4aa40e8fe4c1c3d28e0cb196ad002ba2
MD5 4c083b9ec1d0bacd784a530a54230385
BLAKE2b-256 22523c97cead03c1068b8a7c5f73d27a2dfaf4024c13c4e479220b9303341e67

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dbc8a69c9a986aa18c971c2df002e75cb81abfdef7c7a99b4db3aba0bd85b508
MD5 94fe145b26e991f53092c239b889d644
BLAKE2b-256 727efb2f42ce2943b565aea728f6289db1e5c53492ef220754a72ba9d5d7fba5

See more details on using hashes here.

File details

Details for the file fastsparsegams-0.2.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsparsegams-0.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b562a42c586c2903f51ddd756548c65732896e32498bd909fed835245b2d4b7a
MD5 a48b90466c4b513d1413173982c145e6
BLAKE2b-256 34fe739506570d48105cb5c95fd1712797be88e40d08cff9225be3cb31f904a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page