compare_sets {YAPSA} | R Documentation |
Compare two sets of signatures, stored in numerical data frames
W1
and W2
, by computing the column-wise cosine distance
compare_sets(in_df_small, in_df_big)
in_df_small, in_df_big |
Numerical data frames |
A list with entries
distance
,
hierarchy_small
and
hierarchy_big
.
distance
:
A numerical data frame with the cosine distances between the
columns of W1
, indexing the rows, and W2
, indexing
the columns
hierarchy_small
:
A data frame carrying the information of ranked similarity between
the signatures in W2
with the signatures in W1
hierarchy_big
:
A data frame carrying the information of ranked similarity between
the signatures in W1
with the signatures in W2
sig_1_df <- data.frame(matrix(c(1,0,0,0,0,1,0,0,0,0,1,0),ncol=3)) names(sig_1_df) <- paste0("B",seq_len(dim(sig_1_df)[2])) sig_2_df <- data.frame(matrix(c(1,1,0,0,0,0,1,1),ncol=2)) compare_sets(sig_1_df,sig_2_df)