Use the PathSim metric to compute a meta-path based similarity score. Please note that PathSim can ONLY be used for symmetric meta-paths.

get_pathsim(
  x,
  y,
  paths_x,
  paths_y,
  reference_list = NULL,
  list_type = NULL,
  verbose = TRUE
)

Arguments

x

ID of the origin node.

y

ID of the destination node.

paths_x

Paths from the origin node following the meta-path of interest as a data.table.

paths_y

Paths from the destination node following the meta-path of interest as a data.table.

reference_list

Either an edge list as a data.table which must contain the columns Origin, Destination, OriginType, DestinationType, and EdgeType, or a neighbor reference object constructed by get_neighbor_list().

list_type

If an edge list is provided, specify "edge". If a neighbor list is provided, specify "neighbor".

verbose

Should the intermediate calculations be printed to the console?

Value

A list with two elements:

Metric

The name of the similarity metric (i.e., "PathSim").

Similarity

The PathSim similarity score.

References

Sun, Y., Han, J., Yan, X., Yu, P. S. & Wu, T. PathSim: meta path-based top-K similarity search in heterogeneous information networks. Proc. VLDB Endow. 4, 992–1003 (2011).

See also

get_neighbor_list() for neighbor reference object construction.

Other similarity: get_dwpc(), get_npc(), get_pc()