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 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

fastsparsegams-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

fastsparsegams-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

fastsparsegams-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

fastsparsegams-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

fastsparsegams-0.1.2-cp39-cp39-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

fastsparsegams-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

fastsparsegams-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

fastsparsegams-0.1.2-cp38-cp38-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

fastsparsegams-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

fastsparsegams-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

fastsparsegams-0.1.2-cp37-cp37m-win_amd64.whl (1.4 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

fastsparsegams-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

fastsparsegams-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

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