**Technifi Expert’s Answer:**

**Clustering Coefficient** : A measure of the degree to which nodes in a graph tend to cluster together. **Global Clustering Coefficient:** The ratio of the number of closed triplets to the number of all triplets.

**Local Clustering Coefficient** of a node in a graph quantifies how close its neighbours are to being a complete graph (clique).

A graph G=(V,E) formally consists of a set of vertices V and a set of edges E between them. An edge e connects vertex v_{i} with vertex v_{j. }The neighbourhood N_{i} for a vertex v_{i }is defined as its immediately connects neighbours as follows:

We define k_{i} as the number of vertices,N_{i}, in the neighbourhood, N_{i}, of a vertex

The local clustering coefficient C_{i }for a vertex C_{i}V_{i} is then given by the proportion of links between the vertices within its neighbourhood divided by the number of links that could possibly exist between them. For a directed graph, e_{ij} is distinct from e_{ji}, and therefore for each neighbourhood, N _{i }there are k_{i}(k_{i}-1) links that could exist among the vertices within the neighbourhood k_{i} is the number of neighbours of a vertex). Thus, the **local clustering coefficient for directed graphs** is given as

Thus, the **local clustering coefficient for undirected graphs** can be defined as

Where K is the degree of regular lattice

If you happen to run into some problem while following the steps, please make sure to let us know in the comment section below, and we’ll do our best to solve it. Apart from that, you can contact us on Facebook and Twitter, however we can’t guarantee a rapid reaction time over those platform

## 0 Comments