View source: R/get-similarity.R
get_similarity | R Documentation |
Given a specified meta-path and similarity metric(s), compute the meta-path based similarity score between two nodes.
get_similarity(
x,
y,
mp,
metric = c("pc", "npc", "dwpc", "pathsim"),
node_list,
edge_list = NULL,
neighbor_list = NULL,
check = TRUE,
verbose = TRUE
)
x |
ID of the origin node. |
y |
ID of the destination node. |
mp |
Meta-path as a vector of node types (e.g., |
metric |
A vector of permissible similarity metrics (e.g.,
|
node_list |
Node list as a
|
edge_list |
Edge list as a
|
neighbor_list |
Neighbor reference object constructed by |
check |
Should type checking be performed? Default is |
verbose |
Should the intermediate calculations be printed to the console? |
A list with six elements:
ID of the origin node provided (i.e., x
).
ID of the destination node provided (i.e., y
).
Meta-path provided (i.e., mp
).
Paths following the provided meta-path from the origin node (i.e., x
) to all nodes of the
same type as the destination node (i.e., y
) as a data.table
.
Paths following the REVERSE of the provided meta-path from the destination node (i.e., y
) to all nodes of the
same type as the origin node (i.e., x
) as a data.table
.
Computed meta-path based similarity scores by metric as a data.table
.
get_neighbor_list()
for neighbor reference object construction and get_similarity_function()
for similarity metrics.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.