Learn R Programming

eHDPrep (version 1.3.3)

node_IC_zhou: Calculate Node Information Content (Zhou et al 2008 method)

Description

Computes the information content for each node in a directed graph according to the equation developed by Zhou et al. (2008).

Usage

node_IC_zhou(graph, mode = "in", root, k = 0.5)

Value

tidygraph with additional node attribute "information_content"

Arguments

graph

tidygraph directed graph.

mode

Character constant specifying the directionality of the edges. One of "in" or "out".

root

name of root node identifier in column 1 to calculate node depth from.

k

numeric value to adjust the weight of the two items of information content equation (relative number of hyponyms/descendants and relative node depth). Default = 0.5

References

Zhou, Z., Wang, Y. & Gu, J. A New Model of Information Content for Semantic Similarity in WordNet. in 2008 Second International Conference on Future Generation Communication and Networking Symposia vol. 3 85–89 (2008).

Examples

Run this code
data(example_ontology)
node_IC_zhou(example_ontology, mode = "in", root = "root")

Run the code above in your browser using DataLab