-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding documentation for freemans centrality, spliting measures into …
…vertex and graph
- Loading branch information
Showing
2 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Freeman's network centrality | ||
===================== | ||
|
||
Freeman's centrality tells us how heterogenous is degree centrality ammong vertices of network. For start network, we will get a value 1. | ||
|
||
:math:`FC(g)=\frac{\sum_{x \in g}{N_{max}-|N(x)|}}{(|g|-1)*(|g|-2)}` | ||
|
||
Where ``g`` is given graph, ``N(x)`` returns set of neighbours of vertex ``x``, ``|g|`` is number of vertices in graph ``g`` and :math:`N_{max}` is maximal degree that can be observed in network. | ||
|
||
For further informations please refere to [Freeman]_. | ||
|
||
.. code-block:: scala | ||
import ml.sparkling.graph.operators.OperatorsDSL._ | ||
import org.apache.spark.SparkContext | ||
import org.apache.spark.graphx.Graph | ||
implicit ctx:SparkContext=??? | ||
// initialize your SparkContext as implicit value | ||
val graph =??? | ||
// load your graph (for example using Graph loading API) | ||
val freemanCentrality: Double= graph.freemanCentrality() | ||
// Freeman centrality value for graph | ||
References: | ||
|
||
.. [Freeman] Freeman, L. C. (1978). Centrality in social networks conceptual clarification. Social networks, 1(3), 215-239., `PDF <http://leonidzhukov.ru/hse/2013/socialnetworks/papers/freeman79-centrality.pdf>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters