Description Usage Arguments Value
View source: R/calculate_document_pair_distances.R
Calculate distances between pairs of documents.
1 2 | calculate_document_pair_distances(document_term_matrix, document_indicies,
distance_method = "cosine")
|
document_term_matrix |
A sparse matrix object of class "simple_triplet_matrix", or a dense matrix object, with documents as rows and vocabulary entries as columns. |
document_indicies |
A numeric vector of length two (document_a_row_index, document_b_row_index), or a list object with each entry containing a vector of length two as described above. |
distance_method |
Can be one of "cosine" or "euclidean". Defaults to "cosine". |
A vector of document pair distances
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.