metavariable_info: Compute Metavariable Information
Description
Calculates attributes for each node in a graph object pertaining to their
suitability and rank as metavariables; primarily if they are the most
informative common ancestor (see node_IC_zhou) of a set of
nodes representing a dataset variable.
A modified graph object with additional node attributes pertaining to their
status as a metavariable.
Arguments
graph
Graph containing ontological and dataset nodes. Must be in
tidygraph format or coercible to this format.
mode
Character constant specifying the directionality of the edges.
One of: "in" or "out".
IC_threshold
Metavariables with IC less than this value will be
omitted from output. Default = 0 (no omission).
Details
The added attributes are:
is_metavariable
Logical. If the node has at least two descendants in
the graph which represent dataset variables.
variable_descendants
List. The names of variables of which a node is
an ancestor.
variable_set
Integer. An identifier for the unique set of descendants
in the graph which represent dataset variables. The assigned
number corresponds to the order in which a unique set was identified when
scanning through the node table.
highest_IC
Logical. If the node possesses the highest information
content of all other nodes which are common ancestors of the same variable
set. Information content is expected to have been calculated in
join_vars_to_ontol.
See Also
node_IC_zhou
Other semantic enrichment functions:
join_vars_to_ontol(),
metavariable_agg(),
metavariable_variable_descendants()