{ "info": { "author": "Adam Mantz", "author_email": "amantz@slac.stanford.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7" ], "description": ".. image:: https://img.shields.io/badge/ascl-1602.005-blue.svg?colorB=262255\n :alt: ascl:1602.005\n :target: http://ascl.net/1602.005\n.. image:: https://img.shields.io/pypi/v/lrgs.svg\n :alt: PyPi\n :target: https://pypi.python.org/pypi/lrgs\n.. image:: https://img.shields.io/pypi/l/lrgs.svg\n :alt: MIT\n :target: https://opensource.org/licenses/MIT\n\n=====================================================================================\nLRGS: Linear Regression by Gibbs Sampling\n=====================================================================================\n\nCode implementing a Gibbs sampler to deal with the problem of multivariate linear regression with uncertainties in all measured quantities and intrinsic scatter. Full details can be found in `this paper `_, the abstract of which appears below. (The paper describes an implementation in the R language, while this package is a port of the method to Python.)\n\nKelly (2007, hereafter K07) described an efficient algorithm, using Gibbs sampling, for performing linear regression in the fairly general case where non-zero measurement errors exist for both the covariates and response variables, where these measurements may be correlated (for the same data point), where the response variable is affected by intrinsic scatter in addition to measurement error, and where the prior distribution of covariates is modeled by a flexible mixture of Gaussians rather than assumed to be uniform. Here I extend the K07 algorithm in two ways. First, the procedure is generalized to the case of multiple response variables. Second, I describe how to model the prior distribution of covariates using a Dirichlet process, which can be thought of as a Gaussian mixture where the number of mixture components is learned from the data. I present an example of multivariate regression using the extended algorithm, namely fitting scaling relations of the gas mass, temperature, and luminosity of dynamically relaxed galaxy clusters as a function of their mass and redshift. An implementation of the Gibbs sampler in the R language, called LRGS, is provided.\n\nFor questions, comments, requests, problems, etc. use the `GitHub issues `_.\n\nStatus\n======\nLRGS for Python is currently in alpha. It has not been fully vetted, and some features of the R version are not implemented (see `VERSION.md `_).\n\nInstallation\n============\n\nAutomatic\n---------\n\nInstall from PyPI by running ``pip install lrgs``.\n\nManual\n------\n\nDownload ``lrgs/lrgs.py`` and put it somewhere on your ``PYTHONPATH``. You will need to have the ``numpy`` and ``scipy`` packages installed.\n\nUsage and Help\n==============\n\nDocumentation is sparse at this point, but an example notebook can be found `here `_.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abmantz/lrgs", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "lrgs", "package_url": "https://pypi.org/project/lrgs/", "platform": "", "project_url": "https://pypi.org/project/lrgs/", "project_urls": { "Homepage": "https://github.com/abmantz/lrgs" }, "release_url": "https://pypi.org/project/lrgs/0.0.2/", "requires_dist": [ "numpy", "scipy" ], "requires_python": "", "summary": "Linear Regression by Gibbs Sampling", "version": "0.0.2" }, "last_serial": 4220233, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "fdfd5c35b67a08cc5af6058e9e94e55e", "sha256": "e10b143159176fe4c39c6047db343f586ab9bbc7831bafdbeafaf2e1834a3521" }, "downloads": -1, "filename": "lrgs-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "fdfd5c35b67a08cc5af6058e9e94e55e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8534, "upload_time": "2018-08-29T20:09:48", "url": "https://files.pythonhosted.org/packages/01/f3/5ac4582c80b2b505a8587e0dd185838d42349176538f23b9b9329849b31e/lrgs-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2f9e48d027a992aa4c461b2f06b1692", "sha256": "219bb06b6c22cac0bfaf6049457fa8cf369bf4327c575663f069cb33eaab16f0" }, "downloads": -1, "filename": "lrgs-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b2f9e48d027a992aa4c461b2f06b1692", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7479, "upload_time": "2018-08-29T20:09:49", "url": "https://files.pythonhosted.org/packages/db/50/24fd073876d117279afd9e4ecf6b0a54f4427faf97d112cb33663a750e76/lrgs-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fdfd5c35b67a08cc5af6058e9e94e55e", "sha256": "e10b143159176fe4c39c6047db343f586ab9bbc7831bafdbeafaf2e1834a3521" }, "downloads": -1, "filename": "lrgs-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "fdfd5c35b67a08cc5af6058e9e94e55e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8534, "upload_time": "2018-08-29T20:09:48", "url": "https://files.pythonhosted.org/packages/01/f3/5ac4582c80b2b505a8587e0dd185838d42349176538f23b9b9329849b31e/lrgs-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2f9e48d027a992aa4c461b2f06b1692", "sha256": "219bb06b6c22cac0bfaf6049457fa8cf369bf4327c575663f069cb33eaab16f0" }, "downloads": -1, "filename": "lrgs-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b2f9e48d027a992aa4c461b2f06b1692", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7479, "upload_time": "2018-08-29T20:09:49", "url": "https://files.pythonhosted.org/packages/db/50/24fd073876d117279afd9e4ecf6b0a54f4427faf97d112cb33663a750e76/lrgs-0.0.2.tar.gz" } ] }