弹性网正则化广义线性模型。

pyglmnet的Python项目详细描述


PyGlmnet
=






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~124;gitter

`广义线性模型<;https://en.wikipedia.org/wiki/generalized_u linear_u model>;``是一种公认的回归和分类工具,广泛应用于科学、经济、商业和金融领域。由于它们的凸性损失,它们是唯一可识别的,并且由于其点态非线性和定义良好的噪声模型,它们易于解释。

正则化通过惩罚负对数似然来防止过拟合,并可用于以结构化形式表达关于参数的先验知识。


支离破碎。更具体地说,

-`statsmodels<;http://statsmodels.sourceforge.net/devel/glm.html>;`\uxbr/>提供了广泛的链接函数,但没有正则化。
-`scikit learn<;http://scikit learn.org/stable/modules/generated/sklearn.linear\model.elasticnet.html>;`\uxbr/>提供弹性网正则化,但仅适用于线性模型。
-`lightning<;https://github.com/scikit learn contrib/lightning>;``uuuu
提供弹性网和组套索正则化,但仅适用于
线性和逻辑回归。

**pyglmnet**是对这种分裂。这里有一些
亮点。

-pyglmnet提供了广泛的噪声模型(以及成对的标准
链接函数):``高斯'```,``二项式'`,``多项式'`,
``泊松'`,和``软加'``.

-它支持广泛的正则化:ridge,lasso,elastic net,
"组
套索<;https://en.wikipedia.org/wiki/nomestic戋gradient戋u methods戋u learning戋group戋lasso>;`戋,
和"tikhonov
规则化<;https://en.wikipedia.org/wiki/tikhonov戋regularization>;`戋pyglmnet的api设计与scikit learn,因此您可以部署"pipeline"工具,如"gridsearchcv()"和"cross-val-score()"。

-我们遵循与"friedman,j.,
haste,t.,&tibshirani,r.
(2010)<;https://core.ac.uk/download/files/153/6287975"中相同的方法和符号。pdf>;``和伴随着广泛流行的'r
包<;https://web.stanford.edu/~haste/glmnet/glmnet_alpha.html>;``我们已经实现了一个循环坐标下降优化器,它具有
牛顿更新、活动集、更新缓存和热重启。这种优化方法与r包中使用的方法相同。

-r glmnet包中存在许多python包装(例如
`here<;https://github.com/civisanalytics/python glmnet>;``和
`here<;https://github.com/dwf/glmnet python>;``uu),但在与
相反,pyglmnet是一个纯python实现。因此,在未来很容易修改和引入额外的噪声模型和正则化器。


w是运行时(以毫秒为单位)以适应a:math:`1000`
示例x:math:`100`预测值稀疏矩阵(密度:math:`0.05`)。
这是在c.2011 MacBook Pro上完成的,因此您的数字可能会有所不同。

+——————————————————————————————————————————————————————————————————Distribut|Pyglmnet scikit learn statsmodels r
+============+============+================+===============+=========+
高斯6.8 1.2 29.8 10.3
+———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————-----+
poisson 5.8--117.2 156.1
+——————————————————————————————————————————————————————————————————————————————————————————————————————————————————你需要注意依赖关系:``scikit learn``,``rpy2``,还有
``statsmodels``你自己。


installation
~~~~~~~~~~~~~~

now``pip``可安装!

…代码::bash

$pip install pyglmnet


下面的手动安装说明:

克隆存储库。

…代码::bash

$git clone http://github.com/glm tools/pyglmnet


代码::bash

$python setup.py develop install


Getting Started
~~~~~~~~~~~~~~~~~

>下面是如何使用"glm"估计器的示例。

。代码::python

import numpy as np
import scipy.sparse as sps
from sklearn.preprocessing import standardscaler
from pyglmnet import glm

,100

in=glm.simulate(beta0,beta,x~u列)

glm.fit(scaler.transform(x_train),y_train)

用法://glm tools.github.io/pyglmnet/auto-examples/index.html>;` `

tutorial
~~~~~~~~~

.github.io/pydata-chicago-2016>;``来自a
最近在` pydata chicago
2016<;http://pydata.org/chicago2016/schedule/presentation/15/>;`` uuu,
相应的`教程
笔记本<;http://github.com/pavanramkumar/pydata-chicago-2016>;`` uu和a
`视频<;https://www.youtube.com/watch?v=zxec96kd1ua>;``如何贡献?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

我们欢迎拉取请求。有关详细信息,请参见我们的"开发人员文档
网页<;http://glm tools.github.io/pyglmnet/developers.html>;```有关
>详细信息。




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(H)http://github.com/jasmainak>;```````````titpat achakakulvisut<;http://github.com/tititpata>;`````````````idrizovic<;http://github.com/the872>;```````````````````````````````````````````````````````````````````````````````````````````````````````````` ` `雨果蕨andes<;http://github.com/hugoguh>;`
-`eva dyer<;http://github.com/evadyer>;`
-`matt antalek<;https://github.com/themantalope>;`

致谢
~G<;http://kordinglab.com>;``用于资助和支持
-`sara
solla<;http://www.physics.northwestern.edu/people/joint faculty/sara solla.html>;``用于精彩的GLM讲座

|许可证图像::https://img.shields.io/badge/license-mit-blue.svg?style=flat
:目标:https://github.com/glm tools/pyglmnet/blob/master/license
…|特拉维斯图片:https://api.travis-ci.org/glm-tools/pyglmnet.svg?branch=master
:目标:https://travis ci.org/glm tools/pyglmnet
。| codecov图像::https://codecov.io/github/glm-tools/pyglmnet/coverage.svg?精度=0
:目标:https://codecov.io/gh/glm tools/pyglmnet
…| gitter图像::https://badges.gitter.im/glm tools/pyglmnet.svg
:目标:https://gitter.im/pavanramkumar/pyglmnet?utm_source=徽章和utm_medium=徽章和utm_campaign=公关徽章

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
jenkins在java代码的csv中使用前导零传递数字   终止java应用程序javaw。exe eclipse   java平均字长。文本   java在事务中关闭连接时会发生什么?   java如何为rich faces extendedDatatable启用可调整大小的列?   SpringJavaWebApp头nosniff不适合js和css文件   Java:抛出异常   java获取拒绝ArrayList中存在的用户名的代码。   关于编写JNDI服务提供者的java教程   java Android emulator电子书示例已停止   java如何防止双向关系中的循环   在Java中,如何将接口的实现作为变量传递给方法?   java有没有办法通过注释来监听CoreNLP处理的进度?   java Eclipse错误:导入项目时“无法读取项目描述文件”   java为什么findViewById返回null?