作为示例,这是一个 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/