CosineDFV {dSimer} | R Documentation

## calculate disease similarity by using feature vectors

### Description

given two (lists of) disease names, this function will calculate cosine similarity between these diseases' feature vectors.

### Usage

    CosineDFV(D1, D2, d2f, dcol = 2, fcol = 1, ccol = 3)

### Arguments

`D1` | a vector consists of disease ids/names
`D2` | another vector consists of disease ids/names
`d2f` | data.frame, contains term co-occurrences between features and diseases
`dcol` | integer, disease column number in d2f
`fcol` | integer, feature column number in d2f
`ccol` | integer, co-occurrences column number in d2f

### Value

a matrix of disease disease similarity which rownames and colnames are the disease names

### Author(s)

Zhihui Fei, Peng Ni, Min Li

### References

Zhou X Z, Menche J, Barabasi A L, et al. Human symptoms-disease network[J]. Nature communications, 2014, 5.

Van Driel M A, Bruggeman J, Vriend G, et al. A text-mining analysis of the human phenome[J]. European journal of human genetics, 2006, 14(5): 535-542.

### Examples

    ### this is a disease-symptom-cooccurrence sample, if you want to use
    ### the complete data, please use "data(d2s_hsdn)" command
    data(d2s_hsdn_sample)
    ds <- sample(unique(d2s_hsdn_sample[,2]), 10)
    simmat <- CosineDFV(ds, ds, d2s_hsdn_sample)

[Package dSimer version 1.12.0 Index]