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

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

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

                                        Basic Linear Algebra for Sparse Matrices
                                         稀疏矩阵的基本线性代数

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

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

Basic linear algebra operations for sparse matrices
稀疏矩阵的基本线性代数运算


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

参数:x
matrix of class matrix.csr.
矩阵类matrix.csr。


参数:y
matrix of class matrix.csr or a dense matrix or vector.
类matrix.csr或稠密矩阵或向量矩阵。


参数:value
replacement values.
替换值。


参数:i,j
vectors of elements to extract or replace.
向量的元素中提取或更换。


参数:nrow
optional number of rows for the result.
可选的数字结果的行。


参数:lag
an integer indicating which lag to use.
一个整数,表示这落后的使用。


参数:differences
an integer indicating the order of the difference.
一个整数,指示的顺序的差异。


Details

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

Linear algebra operations for matrices of class matrix.csr are designed to behave exactly as for regular matrices.  In particular, matrix multiplication, kronecker product, addition, subtraction and various logical operations should work as with the conventional dense form of matrix storage, as does indexing, rbind, cbind, and diagonal assignment and extraction.  The method diag may be used to extract the diagonal of a matrix.csr object, to create a sparse diagonal see SparseM.ontology.
线性代数运算矩阵类matrix.csr的行为完全一样,定期矩阵。特别是,矩阵乘法,克罗内克积的,加法,减法,各种逻辑运算应该工作与传统的密集形式的矩阵存储,索引,rbind,CBIND,和对角线分配和萃取。可用于提取的对角线的一个matrix.csr对象的,创建一个稀疏的对角线看到SparseM.ontology的方法诊断。

The function determinant computes the (log) determinant, of the argument, returning a "det" object as the base function. This is preferred over using the function det() which is a simple wrapper for determinant(). Using det() in the following way is somewhat deprecated: <br> det() computes the determinant of the argument matrix.  If the matrix is of class matrix.csr then it must be symmetric, or an error will be returned.  If the matrix is of class matrix.csr.chol then the determinant of the Cholesky factor is returned, ie the product of the diagonal elements.  
的功能determinant计算(log)决定因素的说法,"det"返回一个对象的基本功能。这是首选过度使用功能det()这是一个简单的包装determinant()。使用det()以下列方式有点弃用:<BR>det()计算的参数矩阵的行列式。的矩阵是类matrix.csr,如果,那么它必须是对称的,或将返回一个错误。如果矩阵是类matrix.csr.chol然后Cholesky因子的行列式的返回,即该产品的对角线元素。

The function norm is used to check for symmetry by computing the maximum of the elements of the difference between the matrix and its transpose.  Optionally, this sup norm can be replaced by the Hilbert-Schmidt norm, or the l1 norm.
功能norm是用来检查通过计算它的转置矩阵和之间的差异最大的元素为对称性。希尔伯特 - 施密特规范,或L1范数可选,支持标准可以取代。


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

SparseM: A Sparse Matrix Package for R,<br> http://www.econ.uiuc.edu/~roger/research

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

slm for sparse linear model fitting. SparseM.ontology for coercion and other class relations involving the sparse matrix classes.
slm稀疏线性模型拟合。 SparseM.ontology胁迫和其他阶级关系的稀疏矩阵类。


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


n1 <- 10
n2 <- 10
p <- 6
y <- rnorm(n1)
a <- rnorm(n1*p)
a[abs(a) < 0.5] <- 0
A <- matrix(a,n1,p)
A.csr <- as.matrix.csr(A)
b <- rnorm(n2*p)
b[abs(b)<1.0] <- 0
B <- matrix(b,n2,p)
B.csr <- as.matrix.csr(B)

# matrix transposition and multiplication[矩阵转置和乘法]
A.csr%*%t(B.csr)

# kronecker product - via kronecker() methods:[Kronecker积 - 通过克罗内克()方法:]
A.csr %x% matrix(1:4,2,2)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 04:26 , Processed in 0.023069 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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