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

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

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

                                        Harwell-Boeing Format Sparse Matrices
                                         哈威尔 - 波音格式稀疏矩阵

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

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

Read, and extract components of data in Harwell-Boeing sparse matrix format.
阅读,并从中提取成分的数据在哈威尔波音稀疏矩阵格式。


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


read.matrix.hb(file)
model.matrix(object, ...)
model.response(data,type)



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

参数:file
file name to read from or  
文件名进行读出或


参数:data, object
an object of either 'matrix.csc.hb' or 'matrix.ssc.hb' class
一个对象,要么是matrix.csc.hb或matrix.ssc.hb“的类


参数:type
One of ""any"", ""numeric"", ""double"". Using the either of latter two coerces the result to have storage mode ""double""
其中的“任何”,“数字”,“双”。使用后两种胁迫的结果有存储模式“,”双“


参数:...
additional arguments to model.matrix
其他参数model.matrix


Details

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

Sparse coefficient matrices in the Harwell-Boeing format are stored in  80-column records. Each file begins with a multiple line header block  followed by two, three or four data blocks. The header block contains  summary information on the storage formats and storage requirements.  The data blocks contain information of the sparse coefficient matrix and  data for the right-hand-side of the linear system of equations,  initial guess of the solution and the exact solutions if they exist. The function model.matrix extracts the X matrix component. The function model.response extracts the y vector (or matrix). The function model.guess extracts the guess vector.  The function model.xexact extracts the xexact vector.  This function is written in R replacing a prior implementation based on iohb.c which had memory fault difficulties.  The function write.matrix.hb has been purged; users wishing to write matrices in Harwell-Boeing format are advised to convert SparseM matrices to Matrix classes and use writeHB from the Matrix package.  Contributions of code to facilitate this conversion would be appreciated!
80行的记录的存储稀疏系数矩阵在哈威尔波音格式的。每个文件的开头与一个多行的报头块,然后由两个,三个或四个数据块。报头块中包含的摘要信息的存储格式和存储要求。稀疏系数矩阵和数据的数据块中包含的信息的右手侧的线性系统的方程,该溶液的初始猜测,如果它们存在的精确解。的功能model.matrix提取的X矩阵组件。的功能model.response提取的Y向量(或矩阵)。的功能model.guess中提取的猜测矢量。的功能model.xexact提取xexact的向量。此功能是写在R取代先前实施的基础上iohb.c内存故障的困难。功能write.matrix.hb已被清除,用户希望写矩阵在哈威尔的波音格式应转换SparseM矩阵矩阵包到Matrix类和使用writeHB的,的。贡献代码,以方便这种转换将不胜感激!


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

The function read.matrix.hb returns a list of class  matrix.csc.hb or matrix.ssc.hb depending on how the coefficient matrix is stored in the file.
的功能read.matrix.hb返回一个列表类matrix.csc.hb或matrix.ssc.hb的系数矩阵存储中的file的如何。


参数:ra
ra component of the csc or ssc format of the coefficient matrix, X.
岭分量在csc或SSC格式的系数矩阵,X。


参数:ja
ja component of the csc or ssc format of the coefficient matrix, X.
ja的组成部分,在csc或SSC格式的系数矩阵,X。


参数:ia
ia component of the csc or ssc format of the coefficient matrix, X.
IA分量在csc或SSC格式的系数矩阵,X。


参数:rhs.ra
ra component of the right-hand-side, y, if stored in csc or  ssc format; right-hand-side stored in dense vector or matrix otherwise.
岭组成部分的右手侧,y,如果CSC或SSC格式的存储在右手端存储在茂密的向量或矩阵,否则。


参数:rhs.ja
ja component of the right-hand-side, y, if stored in csc or  ssc format; a null vector otherwise.
JA组件的右手侧,y,如果CSC或SSC格式的存储在一个空的向量,否则。


参数:rhs.ia
ia component of the right-hand-side, y, if stored in csc or  ssc format; a null vector otherwise.
IA组成部分的右手侧,y,如果CSC或SSC格式的存储在一个空的向量,否则。


参数:xexact
vector of the exact solutions, b, if they exist; a null vector otherwise.
的精确解,B,如果它们存在的话;否则一个空矢量的矢量。


参数:guess
vector of the initial guess of the solutions if they exist;  a null vector otherwise.
矢量的初始猜测的解决方案,如果他们存在,否则一个空向量。


参数:dimension
dimenson of the coefficient matrix, X.
的系数矩阵,X. dimenson


参数:rhs.dim
dimenson of the right-hand-side, y.
dimenson的右手侧,y坐标。


参数:rhs.mode
storage mode of the right-hand-side; can be full storage or same format as the coefficient matrix, for the moment the only allowed mode is "F" for full, or dense mode.
右手侧的存储模式;可以是完整的存储或相同的格式的系数矩阵的时刻只允许的模式是“F”为充分,或密集模式。

The function model.matrix returns the X matrix of class matrix.csr. The function model.response returns the y vector (or matrix). The function model.guess returns the guess  vector (or matrix). The function model.xexact returns the xexact vector (or matrix).
函数model.matrix返回X矩阵类matrix.csr。函数model.response返回的y向量(或矩阵)。函数model.guess返回的猜测向量(或矩阵)。函数model.xexact返回的xexact的向量(或矩阵)。


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


Pin Ng



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

User's Guide for Harwell-Boeing Sparse Matrix Collection at

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

slm for sparse version of lm <br> SparseM.ops for operators on class matrix.csr <br> SparseM.solve for linear equation solving for class matrix.csr <br> SparseM.image for image plotting of class matrix.csr <br> SparseM.ontology for coercion of class matrix.csr <br>
slm稀疏版本的lm参考SparseM.ops运营商在类matrix.csr参考SparseM.solve线性方程组求解类matrix.csr参考SparseM.image类matrix.csr参考SparseM.ontology胁迫类matrix.csr<BR>图绘制


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


Xy <- read.matrix.hb(system.file("extdata","lsq.rra",package = "SparseM"))
class(Xy) # -&gt; [1] "matrix.csc.hb"[ - > [1]“matrix.csc.hb”]
X <- model.matrix(Xy)->X
class(X) # -&gt; "matrix.csr"[ - >“matrix.csr”]
dim(X) # -&gt; [1] 1850  712[ - > [1] 1850 712]
y &lt;- model.response(Xy) # extract the rhs[提取的RHS]
length(y) # [1] 1850[[1] 1850]
Xy <- read.matrix.hb(system.file("extdata","rua_32_ax.rua",package = "SparseM"))
X <- model.matrix(Xy)
y &lt;- model.response(Xy) # extract the rhs[提取的RHS]
g &lt;- model.guess(Xy) # extract the guess [提取的猜测]
a &lt;- model.xexact(Xy) # extract the xexact [提取xexact]
fit &lt;- solve(t(X) %*% X, t(X) %*% y) # compare solution with xexact solution [比较xexact的解决方案,解决方案]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 06:35 , Processed in 0.026245 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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