stats

get_graph_degree(edge_index, number_of_nodes)

Finds the degree of each node in a constructed graph.

Parameters:
  • edge_index (array) – A 2 dimensional array, containing the node indexes on either side of each edge.

  • number_of_nodes (int) – The number of nodes in the graph.

Returns:

degree (array) – The degree for each node in the graph.

get_mean_degree_for_edges(edge_index, degree)

Finds the mean degree for each edge. This is done by finding the mean of the degree at each end of the edges.

Parameters:
  • edge_index (array) – A 2 dimensional array, containing the node indexes on either side of each edge.

  • degree (array) – The degree for each node in the graph.

Returns:

mean_degree (array) – The mean degree for each edge.

get_degree_for_edges(edge_index, degree)

Gets the degree of the nodes at each end of the edge.

Parameters:
  • edge_index (array) – A 2 dimensional array, containing the node indexes on either side of each edge.

  • degree (array) – The degree for each node in the graph.

Returns:

edge_degree (array) – The degree for each node in an edge.

get_normalise_log(data)

Gets the log normalised output of a given data set.

Parameters:

data (array) – A given data set.

Returns:

norm_log_data (array) – The normalised logarithm of a data set, i.e. log(data / mean(data))