找回密码
 注册
查看: 299|回复: 0

R语言 sparsenet包 predict.sparsenet()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:34:41 | 显示全部楼层 |阅读模式
predict.sparsenet(sparsenet)
predict.sparsenet()所属R语言包:sparsenet

                                        make predictions from a "sparsenet" object.
                                         作出预测从的“sparsenet”对象。

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Similar to other predict methods, this functions predicts fitted values, coefficients and more from a fitted "sparsenet" object.
此功能与其他预测方法,预测拟合值系数和一个装有"sparsenet"对象。


用法----------Usage----------


## S3 method for class 'sparsenet'
predict(object, newx, s = NULL,  which.gamma = NULL,
type=c("response","coefficients","nonzero"), exact = FALSE, ...)
## S3 method for class 'sparsenet'
coef(object,s=NULL, which.gamma = NULL,exact=FALSE, ...)



参数----------Arguments----------

参数:object
Fitted "sparsenet" model object.
配"sparsenet"模型对象。


参数:newx
Matrix of new values for x at which predictions are to be made. Must be a matrix. This argument is not used for type=c("coefficients","nonzero")
矩阵x的预测是进行新的价值。必须是一个矩阵。这种说法是不用于type=c("coefficients","nonzero")


参数:s
Value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.  
值(s)的惩罚参数lambda在这预测是必需的。默认是整个序列,用于创建模型。


参数:which.gamma
Index or indices of gamma values at which predictions are to be made. Default is all those used in the fit
gamma值的预测是进行指数或指数。默认是所有那些适合使用


参数:type
"response" returns fitted predictions at newx.  Type "coefficients" computes the coefficients at the requested values for s.   Type  "nonzero" returns lists of the indices of the nonzero coefficients for each value of s.
"response"返回拟合预测newx。类型"coefficients"计算系数为s请求的值。输入"nonzero"返回列表中的每个值s的非零系数的指数。


参数:exact
By default (exact=FALSE) the predict function uses linear interpolation to make predictions for values of s that do not coincide with those used in the fitting algorithm. Currently exact=TRUE is not implemented, but prints an error message telling the user how to achieve the exact predictions. This is done my rerunning the algorithm with the desired values interspersed (in order) with the values used in the original fit
默认情况下(exact=FALSE)的预测功能使用线性插值法进行预测值s拟合算法中所使用的不相吻合。目前exact=TRUE没有实现,但显示一个错误信息,告诉用户如何实现准确预测。这是我重新运行该算法所需的值穿插在原来的配合使用的值(按顺序)


参数:...
Not used. Other arguments to predict.   
未使用。其他参数预测。


Details

详细信息----------Details----------

The shape of the objects returned depends on which which.gamma has more than one element. If more than one element, a list of predictions is returned, one for each gamma.
返回的对象的形状取决于哪个which.gamma具有一个以上的元素。如果一个以上的元素,预测的列表被返回时,一个用于每个伽马。


值----------Value----------

The object returned depends on type.
返回的对象类型。


(作者)----------Author(s)----------



Rahul Mazumder, Jerome Friedman and Trevor Hastie

Maintainer: Trevor Hastie <hastie@stanford.edu>




参考文献----------References----------



参见----------See Also----------

glmnet package, sparsenet,  cv.sparsenet  and
glmnet包,sparsenet,cv.sparsenet和


实例----------Examples----------


x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fit=sparsenet(x,y)
predict(fit, which.gamma=5,type="nonzero")
predict(fit,x)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-10 05:12 , Processed in 0.019718 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表