Networks: Another type of ML topic
Last updated
Last updated
Reference for this section can be found here.
A network is a collection of objects (nodes) with relationships / interconnections (edges) between them. The most common and easy method to represent networks is by using graphs, which can be directed or undirected graphs.
We can measure the importance of nodes via either three approaches: degree centrality, closeness centrality, and betweenness centrality.
The nodes can be described by degree centrality. The intuition is that nodes that are important have many connections. Mathematically the degree centrality of a node in an undirected graph is given by,
where N is the number of nodes in the network and d is the degree of the node (number of connections).
Under this approach, the assumption is that important nodes connect other nodes i.e they lie in between many nodes. For every pair of nodes in a connected graph, we consider the shortest path between the nodes. The betweenness centrality for a particular node is the number of these shortest paths that pass through the vertex.
A great application of networks is the page rank algorithm.
NetworkX is a python library for analyzing graphs and networks. Here's an example application.