cos_sim_calc: To calculate the cosine similarity between terms.

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/cos_sim_calc.R

Description

cos_sim_calc calculates the cosine measure of similarity between pairs of terms from a corpus.

Usage

1
cos_sim_calc(nummatrix)

Arguments

nummatrix

A numerical matrix for e.g. a Term Document matrix (output from tdm_for_lsa)

Details

The term document matrix is taken as input and cosine meausures of similarity between all pairs of terms are calculated.

Value

A tab delimited text file containing the similarity values between all pairs of terms.

Note

This file can be input to cytoscape directly.

Author(s)

S. Ramachandran

References

https://en.wikipedia.org/wiki/Cosine_similarity

See Also

tdm_for_lsa

Examples

1
2
## Not run: x = cos_sim_calc(nummatrix)
## here nummatrix is the 'Term Document Matrix' generated from tdm_for_lsa()

pubmed.mineR documentation built on Nov. 26, 2021, 5:11 p.m.