random_probability: Random probability

Description Usage Arguments Value

View source: R/random_probability.R

Description

This function computes the cosine similarity between the set of randomized gene sets and the pathway tf-idf matrix. It calls the cosine_similarity function and returns the probability of a given cosine similarity being random.

Usage

1
2
random_probability(similarity_results, gs_size, num_sets, target_tfidf,
  tfidf_crossprod_mat)

Arguments

similarity_results

Vector of cosine similarities

gs_size

Size of the query set

num_sets

Number of random sets to generate

target_tfidf

Pathway tf-idf matrix.

tfidf_crossprod_mat

Cross-product matrix for pathway tf-idf.

Value

A vector of random probabilities for each pathway given the gene set size.


diogocamacho/druid documentation built on Sept. 17, 2020, 12:39 p.m.