{"categories":[{"label":"GIS","url":"https://skillfed.io/packages/category/scientific-engineering-gis"}],"enrichment":{"capability":"Fits Gaussian, Poisson, QuasiPoisson, and Logistic generalized linear models using iteratively weighted least squares, with full support for sparse design matrices.","skillfed_tags":["spatial-statistics","sparse-matrices","glm"],"use_cases":["Fit Poisson or Logistic models to sparse spatial interaction matrices in transportation or migration studies.","Estimate geographic weighted regression (GWR) components with sparse design matrices.","Perform QuasiPoisson regression when overdispersion is present in count data.","Compute GLM diagnostics (residuals, fitted values, deviance) for sparse regression problems.","Build spatial statistical models as part of a PySAL-based analysis pipeline."],"what_it_does":"spglm is a lightweight, sparse-compatible implementation of generalized linear modeling adapted from Statsmodels. It provides estimation of Gaussian, Poisson, QuasiPoisson, and Logistic regression models using iteratively weighted least squares (IWLS), designed specifically for the sparse design matrices that arise in spatial interaction and geographic weighted regression problems. The package trades some diagnostic breadth for computational efficiency and sparse-matrix support, making it a specialized tool for spatial statistics rather than a general-purpose GLM framework.\n\nThe package depends on numpy, scipy, libpysal, and spreg, and is maintained as part of the PySAL ecosystem. It supports Python 3.9 and later and installs with low friction. The implementation solves least-squares normal equations directly rather than using pseudo-inverse methods, which the authors note is less robust for ill-conditioned data; for more comprehensive GLM functionality they recommend the original Statsmodels package.","worth_installing":"Yes, if you are working with sparse generalized linear models in a spatial statistics context (especially within PySAL). Install with caution if you need robust estimation of ill-conditioned data\u2014the package's direct normal-equation solver is not the most numerically stable approach; Statsmodels is better for that. No known vulnerabilities and active maintenance make it a safe dependency."},"id":"spglm","links":{"html":"https://skillfed.io/packages/spglm","md":"https://skillfed.io/packages/spglm.md","pypi":"https://pypi.org/project/spglm/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-10-25","license_spdx":null,"license_treatment":"permissive","name":"spglm","python_support":"supports_current","summary":"Sparse Generalized Linear Models"},"popularity":{"monthly_downloads":103036,"position":12832,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.0"}
