Description Usage Arguments Value Author(s) Examples
View source: R/compute_similarity.R
compute the similarity of queryProfiles and subjectProfiles by adjusted cosine distance and return a vector of numeric match the queryProfiles and subjectProfiles.
1 2 3 4 5 6 | adjusted_cosine_similarity(
queryProfiles,
subjectProfiles,
is_parallel = TRUE,
no_cores = NULL
)
|
queryProfiles |
a result of |
subjectProfiles |
a result of |
is_parallel |
Logical, indicating if code should be run in parallel. |
no_cores |
Number of cores given as input |
a vector of Normalized adjusted cosine similarity [0-1], Note: the more close to 1 indicates the profiles of region more similar, the more close to 0 indicates the profiles more different.
Hongen Kang geneprophet@163.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
similarity <- adjusted_cosine_similarity(queryProfiles=human_fit_profiles,
subjectProfiles=mouse_fit_profiles)
#check the number of non-NA
length(which(!is.na(similarity)))
#check the number of >0.9
length(which(similarity>0.9))
#check the number of <0.1
length(which(similarity<0.1))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.