Description Usage Arguments Details Value Examples
View source: R/TP_FP_FN_avg_sim.R
Return the numbers of true positives (TP), false positives (FP), false negatives (FN), and average cosine similarity between extracted and ground truth signatures.
1 | TP_FP_FN_avg_sim(extracted.sigs, ground.truth.sigs, similarity.cutoff = 0.9)
|
extracted.sigs |
Mutational signatures discovered by some analysis. A numerical-matrix-like object with columns as signatures. |
ground.truth.sigs |
Ground-truth mutational signatures from a synthetic data set. A numerical-matrix-like object with columns as signatures. |
similarity.cutoff |
A signature in |
Match signatures in extracted.sigs
to
signatures in ground.truth.sigs
using the function
solve_LSAP
, which uses the
"Hungarian" (a.k.a "Kuhn–Munkres") algorithm
https://en.wikipedia.org/wiki/Hungarian_algorithm,
which optimizes the total cost associated with the links
between nodes.
The function first computes the
all-pairs cosine similarity matrix between the two
sets of signatures, then converts cosine similarities
to cosine distances (including similarity.cutoff
)
by subtracting from 1, then
sets distances > the converted cutoff to very large values.
It then applies solve_LSAP
to the resulting
matrix to compute an optimal matching between
extracted.sigs
and ground.truth.sigs
.
A list with the elements
TP
The number of true positive extracted signatures.
FP
The number of false positive extracted signatures.
FN
The number of false negative ground-truth signatures.
avg.cos.sim
Average cosine similarity of
true positives to their matching ground
truth signatures.
table
Table of extracted signature name,
ground-truth signature name, and associated
cosine similarity.
sim.matrix
The similarity matrix corresponding
to the input signatures.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.