spglm


Namespglm JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummarySparse Generalized Linear Models
upload_time2023-10-25 13:50:15
maintainer
docs_urlNone
author
requires_python>=3.9
licenseBSD 3-Clause
keywords spatial statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **G**eneralized **L**inear **M**odeling
=======================================

[![Continuous Integration](https://github.com/pysal/spglm/actions/workflows/testing.yml/badge.svg)](https://github.com/pysal/spglm/actions/workflows/testing.yml)
[![Documentation Status](https://readthedocs.org/projects/spglm/badge/?version=latest)](https://spglm.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/spglm.svg)](https://badge.fury.io/py/spglm)
[![codecov](https://codecov.io/gh/pysal/spglm/branch/main/graph/badge.svg)](https://codecov.io/gh/pysal/spglm)


This module is an adaptation of a portion of [GLM functionality from the
Statsmodels](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/genmod/generalized_linear_model.py) 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](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/genmod/generalized_linear_model.py).

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




            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "spglm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "\"Taylor M. Oshan\" <tayoshan@gmail.com>",
    "keywords": "spatial statistics",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/16/87/5e8ba8b386cdf0289190ae4b1a8aecfeb061c84b4bade081641021a9d257/spglm-1.1.0.tar.gz",
    "platform": null,
    "description": "**G**eneralized **L**inear **M**odeling\n=======================================\n\n[![Continuous Integration](https://github.com/pysal/spglm/actions/workflows/testing.yml/badge.svg)](https://github.com/pysal/spglm/actions/workflows/testing.yml)\n[![Documentation Status](https://readthedocs.org/projects/spglm/badge/?version=latest)](https://spglm.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/spglm.svg)](https://badge.fury.io/py/spglm)\n[![codecov](https://codecov.io/gh/pysal/spglm/branch/main/graph/badge.svg)](https://codecov.io/gh/pysal/spglm)\n\n\nThis module is an adaptation of a portion of [GLM functionality from the\nStatsmodels](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/genmod/generalized_linear_model.py) package, this it has been simplified and customized for the purposes of serving\nas the base for several other PySAL modules, namely SpInt and GWR. Currently, it\nsupports the estimation of Gaussian, Poisson, and Logistic regression using only\niteratively weighted least squares estimation (IWLS). One of the large differences this\nmodule 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](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/genmod/generalized_linear_model.py).\n\nFeatures\n--------\n\n- Gaussian GLM\n- Poisson GLM\n- QuasiPoisson GLM\n- Logistic GLM\n- Selection of most common GLM diagnostics\n- Supports sparse design matrices\n\nFuture Work\n-----------\n\n- Add Negative Binomial GLM\n- Add Gamma GLM\n- Add Zero-inflated/Hurdle extensions of Poisson/Negative Binomial\n- Add support for gradient based optimization for maximum likelihood estimation\n\n\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "Sparse Generalized Linear Models",
    "version": "1.1.0",
    "project_urls": {
        "Home": "https://pysal.org/spglm/",
        "Repository": "https://github.com/pysal/spglm"
    },
    "split_keywords": [
        "spatial",
        "statistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0414fac87dce2abbd7ee3b3bb3250cc2980388802f8cded9234d8ecb09801534",
                "md5": "89b876c5efd04986ab5fc8dc8a762c3a",
                "sha256": "98240e3889c6672405ca90d9f9e7bd59bc86f8ecb69c03a14b87c38d8e6cf1c4"
            },
            "downloads": -1,
            "filename": "spglm-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89b876c5efd04986ab5fc8dc8a762c3a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 41391,
            "upload_time": "2023-10-25T13:50:14",
            "upload_time_iso_8601": "2023-10-25T13:50:14.170506Z",
            "url": "https://files.pythonhosted.org/packages/04/14/fac87dce2abbd7ee3b3bb3250cc2980388802f8cded9234d8ecb09801534/spglm-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16875e8ba8b386cdf0289190ae4b1a8aecfeb061c84b4bade081641021a9d257",
                "md5": "52f10f2a9fd7ef6124697e6af0f93970",
                "sha256": "20519dc38be9d660a28109bb1b89d1068454e79f6413bab2e3987db5bf959327"
            },
            "downloads": -1,
            "filename": "spglm-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "52f10f2a9fd7ef6124697e6af0f93970",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 616651,
            "upload_time": "2023-10-25T13:50:15",
            "upload_time_iso_8601": "2023-10-25T13:50:15.771479Z",
            "url": "https://files.pythonhosted.org/packages/16/87/5e8ba8b386cdf0289190ae4b1a8aecfeb061c84b4bade081641021a9d257/spglm-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 13:50:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pysal",
    "github_project": "spglm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spglm"
}
        
Elapsed time: 0.13623s