R TM 包。在哪里可以找到 TermDocumentMatrix 组件的详细说明?我、j、v

标签 r tm

作为示例,这是一个 tdm:

str(AssociatedPress)
List of 6
$ i       : int [1:302031] 1 1 1 1 1 1 1 1 1 1 ...

$ j       : int [1:302031] 116 153 218 272 299 302 447 455 548 597 ...
$ v       : int [1:302031] 1 2 1 1 1 1 2 1 1 1 ...
$ nrow    : int 2246
$ ncol    : int 10473
$ dimnames:List of 2
..$ Docs : NULL
..$ Terms: chr [1:10473] "aaron" "abandon" "abandoned" "abandoning" ...
- attr(*, "Weighting")= chr [1:2] "term frequency" "tf"
- attr(*, "class")= chr [1:2] "DocumentTermMatrix" "simple_triplet_matrix"

我一直在尝试查找这些列的描述 $i, $j, $v ... 非常感谢,

最佳答案

看看这个:http://www.inside-r.org/packages/cran/slam/docs/as.simple_triplet_matrix

?TermDocumentMatrix

我们看到:

Value

An object of class TermDocumentMatrix or class DocumentTermMatrix
(both inheriting from a simple triplet matrix in package slam)
containing a sparse term-document matrix or document-term matrix. The
attribute Weighting contains the weighting applied to the matrix.

当您单击语句中的链接时两者都继承自 simple triplet matrix :

Arguments

i, j    
Integer vectors of row and column indices, respectively.

v   
Vector of values.

还有...

Details
simple_triplet_matrix is a generator for a class of
“lightweight” sparse matrices, “simply” represented by triplets (i,
j, v) of row indices i, column indices j, and values v, respectively.
simple_triplet_zero_matrix and simple_triplet_diag_matrix are
convenience functions for the creation of empty and diagonal
matrices.

关于R TM 包。在哪里可以找到 TermDocumentMatrix 组件的详细说明?我、j、v,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15973990/

相关文章:

R tm StemCompletion 生成 NA 值

r - 是否可以向 RTextTools 包提供自定义停用词列表?

r - 如何在转换后的数据框中获取第一列的第一行

r - 如何在 dplyr 中使用 NSE 来引用一个变量?

ruby-on-rails - 与 heroku 一起工作的统计引擎

performance - R: tm Textmining 包:文档级元数据生成速度慢

r - R中的静态变量

每个站点和日期随机子集 1 个观察

r - 如何创建一个术语矩阵来对与每个文档关联的数值求和?

r - tm_map 和停用词无法从 R 中创建的语料库中删除不需要的词