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 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file fastsparsegams-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f6ccd289e41fe409fa81a11a4fab0ac8620d50a8e7cff738663d706641150e0 |
|
MD5 | b1df68f2faef49ff5cd1a6d6605ac2a6 |
|
BLAKE2b-256 | 4db0d8ff62c4be7b0762487a42ae01e2ce131a19b2ebdd2151ab70bdd8d2164d |
File details
Details for the file fastsparsegams-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01051565c5567ebff3988aa3f3808abe0ff386973f8763300c02bd921bad0ec3 |
|
MD5 | aefb74f998db843f1bd3d357ba769d52 |
|
BLAKE2b-256 | 04c5eba9c23688be70f52f3b556d22c01a019027fab482469d52bd3edc9d77a6 |
File details
Details for the file fastsparsegams-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb34c3e0aad65e180565492257df3cf61e80c91ed0045ecadcc5b97850d8d7cf |
|
MD5 | 774954b6b6e4b1a45e3229a4c79c2825 |
|
BLAKE2b-256 | 1e01f12fa99ab065e9a25d26aa8298a484cfae4fb85e37ef3a79667b8e36ac95 |
File details
Details for the file fastsparsegams-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d46cb4102ca2d204f484dd978a7442abc34fad375cb9d2a6257338516beee971 |
|
MD5 | 48fe34a76f5df7ad426fe3abd6d28c65 |
|
BLAKE2b-256 | ff70ef167435e03119db93b45ddfcd2171de6ecd557fb668f073ca5bbe30e17f |
File details
Details for the file fastsparsegams-0.1.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb050f265ebcb906926ae4a4ba8b9f9658a37927653d7d4d9cc8a4946b7cc1f |
|
MD5 | 20bec4620c7874c060e43b8614ee5771 |
|
BLAKE2b-256 | 711fe2e4a6b6e9cf4fa1eb1bd0c5a7da5a64414488a08dbfe17bf3f3d3df65b0 |
File details
Details for the file fastsparsegams-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.9 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3347d3f20fd8e6c84175eae31d344a4c63a68c7be4efb73388a6e8ea7b560300 |
|
MD5 | 6f9a25dad51d85d7a6c4a038f3bfd813 |
|
BLAKE2b-256 | ecf89948aabbf7676a597e77316c9e79f2a7eeeb769c6b8b267b99b53775a906 |
File details
Details for the file fastsparsegams-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6623807b8c16827d2d952c60d86786493b751a60d5bcfdcf4e44bf4cea9a13fb |
|
MD5 | 1f742368ac065bd16d9a45b7e0a15640 |
|
BLAKE2b-256 | 6a7594fb342811585416f9f0bd74bd4d4c2096da1fc024d19e8d3cc390b33a79 |
File details
Details for the file fastsparsegams-0.1.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c81a909b10deab432dbc2839d579b53298a7044e352ac6c5ff3faa9b576bd820 |
|
MD5 | 4c210fc5eec8c9fdb25da6b6ff56c432 |
|
BLAKE2b-256 | c43f8462da3c4b8a10fc863d29be23761aad367c33165a1da9fb19220dd29507 |
File details
Details for the file fastsparsegams-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.9 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9b9dcd5b7e4deb16a549a062ccf108632521536c5411ab4d55261c97d709c3d |
|
MD5 | f3aa4b4638854b6d15fc2dcbcdf0f3ef |
|
BLAKE2b-256 | 57a2faf26275f60b019205347586b4f366665ea972c2d19a2786d9159a458292 |
File details
Details for the file fastsparsegams-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c21b4d2ad5f5747a1734382f3ceaaa9fd11c5c72f66c58d23ea68154544183 |
|
MD5 | 3307cbe4830946949e600d1937fb7f18 |
|
BLAKE2b-256 | c6146b9bfd52c1c51e0d01dcb8bda9d9b861fd82cf00dd40ff412cb62c2a52c9 |
File details
Details for the file fastsparsegams-0.1.2-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cacbbc6ba95e86bcaa8f9c64dcaa798d816b1236efd331fbb629c75af2a59660 |
|
MD5 | ad07b8cf9506d4d59188ab1d030057ea |
|
BLAKE2b-256 | b070e78e712da622182e1c754471bf838e1c52d2169f80fd11aaead0241d3896 |
File details
Details for the file fastsparsegams-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 11.9 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9d928d0fe129d7c179ee49bdfc014044086dcc6dfa6380838e992c88d766f35 |
|
MD5 | 4e257b20c058940cead4b0813fe7a209 |
|
BLAKE2b-256 | d4441c5b73ee8ebea8d78e901772def875a1ffca40b1464b5024cdabbd7c0343 |
File details
Details for the file fastsparsegams-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fastsparsegams-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6faca9f79e5c861950191c2a6bdbf29c229821d733b329508810019ad89d392e |
|
MD5 | 0b1fb55b39cb6cccd68ffc90990e3d87 |
|
BLAKE2b-256 | 126d1d66996a945602b6e26c03c1b07e0cd7c279c0b9b341b57f44f386460402 |