wtlassoglm(SIS)
wtlassoglm()所属R语言包:SIS
Weighted L1 regularized loglikelihood for generalized linear models
广义线性模型,加权L1规范loglikelihood
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This functions solves weighted L1 regularized loglikelihood for generalized linear models.
此功能解决了广义线性模型的加权L1规范loglikelihood。
用法----------Usage----------
wtlassoglm(x, y, lassoweight=NULL, initsoln=NULL, family = binomial(),
weight = NULL, offset = NULL, lambda2=0, function.precision=1e-10)
参数----------Arguments----------
参数:x
an (n * p) matrix of features.
(N * P)矩阵的功能。
参数:y
an (n) vector of response.
一个(n)的矢量的响应。
参数:lassoweight
a (p) vector of weights specifying the weighted L1 penalty.
的(p)的权重矢量指定的加权L1罚款。
参数:initsoln
a (p+1) vector of initial solution.
初始解(p +1个)的矢量。
参数:family
a description of the error distribution and link function to be used in the model.
在模型中使用的误差分布的描述和链接功能。
参数:weight
an optional (n) vector of weights to be used in the fitting process.
在嵌合过程中要使用的一个可选的(n)的权重向量。
参数:offset
this can be used to specify an a priori known component to be included in the linear predictor during fitting.
这可以被用来指定一个a priori已知的组件被包括在配合期间的线性预测。
参数:lambda2
regularization parameter for the L2 norm of the coefficients. Default is 0.
正则化参数的L2范数的系数。默认是0.
参数:function.precision
function.precision parameter used in the internal solver. Default is 1e-10.
function.precision参数的内部求解器使用。默认是1e-10.
Details
详细信息----------Details----------
This function solves weighted L1 regularized loglikelihood for generalized linear models. It is based on the source code of R package glmpath.
此功能解决了广义线性模型的加权L1规范loglikelihood。它是基于源代码的R套件“glmpath。
值----------Value----------
An object is returned with <table summary="R valueblock"> <tr valign="top"><td>lambda2</td> <td> λ_2 used. </td></tr> <tr valign="top"><td>xnames</td> <td> column names of x. </td></tr> <tr valign="top"><td>family</td> <td> a description of the error distribution and link function to be used in the model. </td></tr> <tr valign="top"><td>weight</td> <td> an optional (n) vector of weights to be used in the fitting process. </td></tr> <tr valign="top"><td>offset</td> <td> this can be used to specify an a priori known component to be included in the linear predictor during fitting. </td></tr> <tr valign="top"><td>lassoweight</td> <td> a (p) vector of weights specifying the weighted L1 penalty. </td></tr> <tr valign="top"><td>initsoln</td> <td> a (p+1) vector of initial solution. </td></tr> <tr valign="top"><td>w</td> <td> a (p+1) vector of weight L1 solution. </td></tr> </table>
返回一个对象,<table summary="R valueblock"> <tr valign="top"> <TD> lambda2</ TD> <TD> λ_2使用。 </ TD> </ TR> <tr valign="top"> <TD> xnames </ TD> <TD>列名的x。 </ TD> </ TR> <tr valign="top"> <TD>family</ TD> <TD>的误差分布和链接功能,可以在模型中使用的描述。 </ TD> </ TR> <tr valign="top"> <TD>weight</运输署> <TD>一个可选的(n)的在嵌合过程中要使用的权重向量。 </ TD> </ TR> <tr valign="top"> <TD>offset </ TD> <TD>这可以用来指定a priori已知成分被列入在拟合的线性预测。 </ TD> </ TR> <tr valign="top"> <TD>lassoweight</ TD> <td>一个(P)的规定的加权L1处罚的权重向量。 </ TD> </ TR> <tr valign="top"> <TD>initsoln </ TD> <td>一个(P +1)向量的初步解决方案。 </ TD> </ TR> <tr valign="top"> <TD>w </ TD> <td>一个(P +1)向量的重量L1的解决方案。 </ TD> </ TR> </ TABLE>
(作者)----------Author(s)----------
Jianqing Fan, Yang Feng, Richard Samworth, and Yichao Wu
参见----------See Also----------
scadglm, fullscadglm
scadglm,fullscadglm
实例----------Examples----------
set.seed(0)
b <- c(2,2,2,-3*sqrt(2))
n=400
p=30
truerho=0.5
x=matrix(rnorm(n*p, mean=0, sd=1), n, p)
feta=x[, 1:4]%*%b
fprob=exp(feta)/(1+exp(feta))
y=rbinom(n, 1, fprob)
lassoweight<-rep(0.6,30)
wtlassoglm(x,y,lassoweight)$w
coef(glm(y~x,family=binomial()))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|