R/compare-sets.R
compare_sets.RdGiven a specified meta-path, similarity metric(s), and aggregation method(s), compute the meta-path based similarity score between two nodes.
IDs of node set #1 as a vector.
IDs of node set #2 as a vector.
Meta-path as a vector of node types (e.g., c("TypeA", "TypeB", "TypeC")).
A vector of permissible similarity metrics (e.g., c("npc", "dwpc")), see defined metrics below:
Specify "pc", corresponding to get_pc().
Specify "npc", corresponding to get_npc().
Specify "dwpc", corresponding to get_dwpc().
Specify "pathsim", corresponding to get_pathsim().
Node list as a data.table which must contain the following columns:
NodeNode IDs (corresponding to either Origin or Destination in the edge list).
NodeTypeNode types (corresponding to either OriginType or
DestinationType in the edge list).
Edge list as a data.table which must contain the following columns:
OriginIDs of the origin nodes for each edge.
DestinationIDs of the destination nodes for each edge.
OriginTypeTypes of the origin node for each edge.
DestinationTypeTypes of the destination node for each edge.
EdgeTypeTypes of each edge.
Neighbor reference object constructed by get_neighbor_list().
Should type checking be performed? Default is TRUE.
Should the intermediate calculations be printed to the console?
A list with six elements:
IDs of node set #1 provided (i.e., set1).
ID of node set #2 provided (i.e., set2).
List of pairwise comparisons.
Intermediate computations produced by get_similarity().
Pairwise similarity scores.
Aggregate set similarity score(s).
get_neighbor_list() for neighbor reference object construction,
get_similarity_function() for similarity metrics, and
get_aggregation_function() for aggregation methods. This function is a
wrapper around get_similarity().