gives a list of authority and hub centralities for the vertices in the graph g.
HITSCentrality[{vw,…}]
uses rules vw to specify the graph g.
HITSCentrality
gives a list of authority and hub centralities for the vertices in the graph g.
HITSCentrality[{vw,…}]
uses rules vw to specify the graph g.
Details and Options
- HITSCentrality is also known as Kleinberg centrality.
- HITSCentrality gives two lists of authority centralities
and hub centralities
for each vertex. - If the graph g has adjacency matrix
, then authority centralities are given by
, where
is the largest eigenvalue of
, and hub centralities are given by
. » - The authority and hub centralities satisfy
and
. » - The option WorkingPrecision->p can be used to control the precision used in internal computations.
- HITSCentrality works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open all close allBasic Examples (2)
Compute HITS hub and authority centralities:
g = RandomGraph[{10, 20}];HITSCentrality[g]BarChart[Transpose[%], ChartLegends -> {"Authority", "Hub"}]Rate web pages using hyperlink-induced topic search:
g = [image];{aut, hub} = HITSCentrality[g]Web pages with high hub centralities are connected to many other web pages:
Part[VertexList[g], Ordering[hub, All, Greater]] //ShortWeb pages with high authority centralities are connected from many other web pages:
Part[VertexList[g], Ordering[aut, All, Greater]] //ShortScope (6)
HITSCentrality works with undirected graphs:
HITSCentrality[[image]]HITSCentrality[[image]]HITSCentrality[[image]]HITSCentrality[[image]]Use rules to specify the graph:
HITSCentrality[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}]HITSCentrality works with large graphs:
g = GridGraph[{10, 10, 10, 10}];HITSCentrality[g]//Short//TimingOptions (3)
WorkingPrecision (3)
By default, HITSCentrality finds centralities using machine-precision computations:
HITSCentrality[[image]]Specify a higher working precision:
HITSCentrality[[image], WorkingPrecision -> 50]Infinite working precision corresponds to exact computation:
HITSCentrality[[image], WorkingPrecision -> ∞]Applications (3)
Highlight the HITS authority and hub centralities for CycleGraph:
HighlightCentrality[g_, cc_] := HighlightGraph[g, Table[Style[VertexList[g][[i]], ColorData["TemperatureMap"][cc[[i]] / Max[cc]]], {i, VertexCount[g]}]];g = CycleGraph[8, VertexSize -> Large];{ahc, hhc} = HITSCentrality[g];HighlightCentrality[g, #]& /@ %g = GridGraph[{5, 5}, VertexSize -> 0.5];{ahc, hhc} = HITSCentrality[g];HighlightCentrality[g, #]& /@ %g = CompleteKaryTree[3, 3, VertexSize -> Large];{ahc, hhc} = HITSCentrality[g];HighlightCentrality[g, #]& /@ %g = PathGraph[Range[20], VertexSize -> Large];{ahc, hhc} = HITSCentrality[g];HighlightCentrality[g, #]& /@ %A network of web pages linked via hyperlinks. Find the top five informative web pages:
g = DynamicModule[«3»];{aut, hub} = HITSCentrality[g];Find the top five pages containing authoritative information:
Table[VertexList[g][[i]], {i, Ordering[aut, -5]}]HITS authority ranking is highly correlated with in-degree ranking:
Correlation[aut, DegreeCentrality[g, "In"]]Find the top five pages containing links to authoritative pages:
Table[VertexList[g][[i]], {i, Ordering[hub, -5]}]HITS hub ranking is highly correlated with out-degree ranking:
Correlation[hub, DegreeCentrality[g, "Out"]]Properties & Relations (4)
The authority and hub centrality can be found using the first eigenvector of
:
g = [image];{x, y} = HITSCentrality[g];a = N@AdjacencyMatrix[g];With[{u = Abs[First[Eigenvectors[a.a, 1]]]}, u / Norm[u, 1]]xa.xyThe authority
and hub
centralities satisfy
and
:
g = [image];{x, y} = HITSCentrality[g];
a = N@AdjacencyMatrix[g];
λ1 = First@Eigenvalues[a.a, 1];{y == a.x, x == 1 / λ1 a.y}The authority centrality is normalized:
g = RandomGraph[{10, 20}];Total[First[HITSCentrality[g]]]Use VertexIndex to obtain the authority centrality and hub centrality of a specific vertex:
g = ExampleData[{"NetworkGraph", "Friendship"}];HITSCentrality[g][[All, VertexIndex[g, "Anna"]]]Related Guides
Text
Wolfram Research (2010), HITSCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/HITSCentrality.html (updated 2015).
CMS
Wolfram Language. 2010. "HITSCentrality." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/HITSCentrality.html.
APA
Wolfram Language. (2010). HITSCentrality. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HITSCentrality.html
BibTeX
@misc{reference.wolfram_2026_hitscentrality, author="Wolfram Research", title="{HITSCentrality}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/HITSCentrality.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_hitscentrality, organization={Wolfram Research}, title={HITSCentrality}, year={2015}, url={https://reference.wolfram.com/language/ref/HITSCentrality.html}, note=[Accessed: 12-June-2026]}