cos_sim_calc_boot: Cosine Similarity Calculation by Boot Strapping

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

View source: R/cos_sim_calc_boot.R

Description

cos_sim_calc_boot allows boot strap analysis. This function should be used as argument for 'statistic' in the boot function of 'boot' package.

Usage

1

Arguments

data

Term Document Matrix generated from tdm_for_lsa function of this package. In this matrix, rows are terms and columns are abstracts.

indices

index of matrix.

Details

while calling this function we need to transpose the input tdm and can also set the number of replicates. boot package is required to call this function.

Value

It will return a matrix containing the cosine similarity of pairs of terms in the abstracts. This object is in same format as returned by the 'boot' function of 'boot' package.

Author(s)

Dr.S.Ramachandran

See Also

tdm_for_lsa

Examples

1
2
3
## Not run: test_boot = boot(data = t(nummatrix), statistic = cos_sim_calc_boot, R = 2)
## here 'nummatrix' is a Term Document Matrix, boot inbuilt function of boot package, 
## R is number of replicates here it is 2. User can extend this number.

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