Skip to main content

Sparse Generalized Linear Models

Project description

Generalized Linear Modeling

Continuous Integration Documentation Status PyPI version codecov

This module is an adaptation of a portion of GLM functionality from the Statsmodels package, this it has been simplified and customized for the purposes of serving as the base for several other PySAL modules, namely SpInt and GWR. Currently, it supports the estimation of Gaussian, Poisson, and Logistic regression using only iteratively weighted least squares estimation (IWLS). One of the large differences this module and the functions avaialble in the Statsmodels package is that the custom IWLS routine is fully sparse compatible, which was necesary for the very sparse design matrices that arise in constrained spatial interaction models. The somewhat limited functionality and computation of only a subset of GLM diagnostics also decreases the computational overhead. Another difference is that this module also supports the estimation of QuasiPoisson models. One caveat is that this custom IWLS routine currently generates estimates by directly solves the least squares normal equations rather than using a more robust method like the pseudo inverse. For more robust estimation of ill conditioned data and a fuller GLM framework we suggest using the original GLM functionality from Statsmodels.

Features

  • Gaussian GLM
  • Poisson GLM
  • QuasiPoisson GLM
  • Logistic GLM
  • Selection of most common GLM diagnostics
  • Supports sparse design matrices

Future Work

  • Add Negative Binomial GLM
  • Add Gamma GLM
  • Add Zero-inflated/Hurdle extensions of Poisson/Negative Binomial
  • Add support for gradient based optimization for maximum likelihood estimation

Project details


Download files

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

Source Distribution

spglm-1.1.0rc1.tar.gz (616.7 kB view details)

Uploaded Source

Built Distribution

spglm-1.1.0rc1-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file spglm-1.1.0rc1.tar.gz.

File metadata

  • Download URL: spglm-1.1.0rc1.tar.gz
  • Upload date:
  • Size: 616.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for spglm-1.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 1f975813e69d5d654803c641161cff84d8fa6cd714adbb2b90bded292ef3af15
MD5 767b86685251e4aa6f042307bcbe76ff
BLAKE2b-256 b585149c8249c0a4e30efc0126e1a060e5a9ac3407c145aad94442ff7648a604

See more details on using hashes here.

File details

Details for the file spglm-1.1.0rc1-py3-none-any.whl.

File metadata

  • Download URL: spglm-1.1.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for spglm-1.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 aea0146c58f900ea47c118b8699f1ca18a53894ebb6c83cc9cd41fea8f6ac166
MD5 3409fe7f1965f8a17169067f9f37bccd
BLAKE2b-256 fd54a0ebe4c8dff4c413816b522400f63d9ca4872fd08dbce59263f45dd5a0d9

See more details on using hashes here.

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