{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": "pyglmnet\n========\n\nA python implementation of elastic-net regularized generalized linear models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|License| |Travis| |Codecov| |Circle| |Gitter| |DOI|\n\n`[Documentation (stable version)]`_ `[Documentation (development version)]`_\n\n`Generalized linear\nmodels `__ are\nwell-established tools for regression and classification and are widely\napplied across the sciences, economics, business, and finance. They are\nuniquely identifiable due to their convex loss and easy to interpret due\nto their point-wise non-linearities and well-defined noise models.\n\nIn the era of exploratory data analyses with a large number of predictor\nvariables, it is important to regularize. Regularization prevents\noverfitting by penalizing the negative log likelihood and can be used to\narticulate prior knowledge about the parameters in a structured form.\n\nDespite the attractiveness of regularized GLMs, the available tools in\nthe Python data science eco-system are highly fragmented. More\nspecifically,\n\n- `statsmodels `__\n provides a wide range of link functions but no regularization.\n- `scikit-learn `__\n provides elastic net regularization but only for linear models.\n- `lightning `__\n provides elastic net and group lasso regularization, but only for\n linear and logistic regression.\n\n**Pyglmnet** is a response to this fragmentation. It runs on Python 3.5+,\nand here are some of the highlights.\n\n- Pyglmnet provides a wide range of noise models (and paired canonical\n link functions): ``'gaussian'``, ``'binomial'``, ``'probit'``,\n ``'gamma'``, '``poisson``', and ``'softplus'``.\n\n- It supports a wide range of regularizers: ridge, lasso, elastic net,\n `group\n lasso `__,\n and `Tikhonov\n regularization `__.\n\n- Pyglmnet's API is designed to be compatible with scikit-learn, so you\n can deploy ``Pipeline`` tools such as ``GridSearchCV()`` and\n ``cross_val_score()``.\n\n- We follow the same approach and notations as in `Friedman, J.,\n Hastie, T., & Tibshirani, R.\n (2010) `__ and the\n accompanying widely popular `R\n package `__.\n\n- We have implemented a cyclical coordinate descent optimizer with\n Newton update, active sets, update caching, and warm restarts. This\n optimization approach is identical to the one used in R package.\n\n- A number of Python wrappers exist for the R glmnet package (e.g.\n `here `__ and\n `here `__) but in contrast to\n these, Pyglmnet is a pure python implementation. Therefore, it is\n easy to modify and introduce additional noise models and regularizers\n in the future.\n\nInstallation\n~~~~~~~~~~~~\n\nInstall the stable PyPI version with ``pip``\n\n.. code:: bash\n\n $ pip install pyglmnet\n\nFor the bleeding edge development version:\n\nClone the repository.\n\n.. code:: bash\n\n $ pip install https://api.github.com/repos/glm-tools/pyglmnet/zipball/master\n\nGetting Started\n~~~~~~~~~~~~~~~\n\n\nHere is an example on how to use the ``GLM`` estimator.\n\n.. code:: python\n\n import numpy as np\n import scipy.sparse as sps\n from pyglmnet import GLM, simulate_glm\n\n n_samples, n_features = 1000, 100\n distr = 'poisson'\n\n # sample a sparse model\n beta0 = np.random.rand()\n beta = np.random.random(n_features)\n beta[beta < 0.9] = 0\n\n # simulate data\n Xtrain = np.random.normal(0.0, 1.0, [n_samples, n_features])\n ytrain = simulate_glm('poisson', beta0, beta, Xtrain)\n Xtest = np.random.normal(0.0, 1.0, [n_samples, n_features])\n ytest = simulate_glm('poisson', beta0, beta, Xtest)\n\n # create an instance of the GLM class\n glm = GLM(distr='poisson', score_metric='deviance')\n\n # fit the model on the training data\n glm.fit(Xtrain, ytrain)\n\n # predict using fitted model on the test data\n yhat = glm.predict(Xtest)\n\n # score the model on test data\n deviance = glm.score(Xtest, ytest)\n\n`More pyglmnet examples and use\ncases `__.\n\nTutorial\n~~~~~~~~\n\nHere is an `extensive\ntutorial `__ on GLMs,\noptimization and pseudo-code.\n\nHere are\n`slides `__ from a\ntalk at `PyData Chicago\n2016 `__,\ncorresponding `tutorial\nnotebooks `__ and a\n`video `__.\n\nHow to contribute?\n~~~~~~~~~~~~~~~~~~\n\nWe welcome pull requests. Please see our `developer documentation\npage `__ for more\ndetails.\n\nAcknowledgments\n~~~~~~~~~~~~~~~\n\n- `Konrad Kording `__ for funding and support\n- `Sara\n Solla `__\n for masterful GLM lectures\n\nLicense\n~~~~~~~\n\nMIT License Copyright (c) 2016-2019 Pavan Ramkumar\n\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat\n :target: https://github.com/glm-tools/pyglmnet/blob/master/LICENSE\n.. |Travis| image:: https://api.travis-ci.org/glm-tools/pyglmnet.svg?branch=master\n :target: https://travis-ci.org/glm-tools/pyglmnet\n.. |Codecov| image:: https://codecov.io/github/glm-tools/pyglmnet/coverage.svg?precision=0\n :target: https://codecov.io/gh/glm-tools/pyglmnet\n.. |Circle| image:: https://circleci.com/gh/glm-tools/pyglmnet.svg?style=svg\n :target: https://circleci.com/gh/glm-tools/pyglmnet\n.. |Gitter| image:: https://badges.gitter.im/glm-tools/pyglmnet.svg\n :target: https://gitter.im/pavanramkumar/pyglmnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge\n.. |DOI| image:: https://zenodo.org/badge/55302570.svg\n :target: https://zenodo.org/badge/latestdoi/55302570\n.. _[Documentation (stable version)]: http://glm-tools.github.io/pyglmnet\n.. _[Documentation (development version)]: https://circleci.com/api/v1.1/project/github/glm-tools/pyglmnet/latest/artifacts/0/html/index.html?branch=master\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "https://github.com/glm-tools/pyglmnet.git", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://glm-tools.github.io/pyglmnet/", "keywords": "", "license": "MIT", "maintainer": "Pavan Ramkumar", "maintainer_email": "pavan.ramkumar@gmail.com", "name": "pyglmnet", "package_url": "https://pypi.org/project/pyglmnet/", "platform": "any", "project_url": "https://pypi.org/project/pyglmnet/", "project_urls": { "Bug Reports": "https://github.com/glm-tools/pyglmnet/issues", "Documentation": "http://glm-tools.github.io/pyglmnet/", "Download": "https://github.com/glm-tools/pyglmnet.git", "Homepage": "http://glm-tools.github.io/pyglmnet/", "Source": "https://github.com/glm-tools/pyglmnet" }, "release_url": "https://pypi.org/project/pyglmnet/1.1/", "requires_dist": null, "requires_python": "", "summary": "Elastic-net regularized generalized linear models.", "version": "1.1", "yanked": false, "yanked_reason": null }, "last_serial": 6039189, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "52997300cd8de15d15920200c13b09a4", "sha256": "54ca3b4e53cc800475f93f16703910c7fad4636654ddb4811188236af264a0a9" }, "downloads": -1, "filename": "pyglmnet-1.0.0.tar.gz", "has_sig": false, "md5_digest": "52997300cd8de15d15920200c13b09a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21539, "upload_time": "2016-11-19T00:25:03", "upload_time_iso_8601": "2016-11-19T00:25:03.852640Z", "url": "https://files.pythonhosted.org/packages/6d/d8/3e40e2f88680470443aa61cafc6514b5a8630fcd376d460f8866d3a263ae/pyglmnet-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1": [ { "comment_text": "", "digests": { "md5": "ddaa6060d4c70aec7080c941ba4fbbcf", "sha256": "2c26db778d27dd6c5fe5d4fbffa877605945d36223a7f159b1d510f177b9da1d" }, "downloads": -1, "filename": "pyglmnet-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ddaa6060d4c70aec7080c941ba4fbbcf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23216, "upload_time": "2019-10-28T03:29:24", "upload_time_iso_8601": "2019-10-28T03:29:24.143035Z", "url": "https://files.pythonhosted.org/packages/43/d8/9244c82dbe764d20247845caeb8130a25affa1dc844e419a17291a8061ae/pyglmnet-1.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "e7a90f472d7613162ad1deb372087b09", "sha256": "6949eb9ea14ca43b6fbfbdb25b89fc3493f8b8f78705523b3a603dcd85d707a6" }, "downloads": -1, "filename": "pyglmnet-1.1.tar.gz", "has_sig": false, "md5_digest": "e7a90f472d7613162ad1deb372087b09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 162612, "upload_time": "2019-10-28T03:29:26", "upload_time_iso_8601": "2019-10-28T03:29:26.425576Z", "url": "https://files.pythonhosted.org/packages/b3/b4/862550f7a6289752abd9c5ceb534259530c57a930371485c0704944ec1d4/pyglmnet-1.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ddaa6060d4c70aec7080c941ba4fbbcf", "sha256": "2c26db778d27dd6c5fe5d4fbffa877605945d36223a7f159b1d510f177b9da1d" }, "downloads": -1, "filename": "pyglmnet-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ddaa6060d4c70aec7080c941ba4fbbcf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23216, "upload_time": "2019-10-28T03:29:24", "upload_time_iso_8601": "2019-10-28T03:29:24.143035Z", "url": "https://files.pythonhosted.org/packages/43/d8/9244c82dbe764d20247845caeb8130a25affa1dc844e419a17291a8061ae/pyglmnet-1.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "e7a90f472d7613162ad1deb372087b09", "sha256": "6949eb9ea14ca43b6fbfbdb25b89fc3493f8b8f78705523b3a603dcd85d707a6" }, "downloads": -1, "filename": "pyglmnet-1.1.tar.gz", "has_sig": false, "md5_digest": "e7a90f472d7613162ad1deb372087b09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 162612, "upload_time": "2019-10-28T03:29:26", "upload_time_iso_8601": "2019-10-28T03:29:26.425576Z", "url": "https://files.pythonhosted.org/packages/b3/b4/862550f7a6289752abd9c5ceb534259530c57a930371485c0704944ec1d4/pyglmnet-1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }