compare_sets: Compare two sets of signatures by cosine distance

Description Usage Arguments Value See Also Examples

View source: R/basic_functions.R

Description

Compare two sets of signatures, stored in numerical data frames W1 and W2, by computing the column-wise cosine distance

Usage

1
compare_sets(in_df_small, in_df_big)

Arguments

in_df_small, in_df_big

Numerical data frames W1 and W2, ideally the bigger one first, both with n rows and l1 and l2 columns, n being the number of features and l1 and l2 being the respective numbers of signatures of W1 and W2

Value

A list with entries distance, hierarchy_small and hierarchy_big.

See Also

cosineDist

Examples

1
2
3
4
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)

huebschm/YAPSA documentation built on May 17, 2019, 9:11 p.m.