# HITS¶

After measure computation, each vertex of graph will have assigned two scores (hub,authority). Where hub score is proportional to sum of authority score of its neighbours, and authority score is proportional to sum of hub score of its neighbours.

For further informations please refer to [Kleinberg].

Here you can see how to use measure:

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 =???

val centralityGraph: Graph[(Double,Double), _] = graph.hits()
// Graph where each vertex is associated with its hits score (represented as a tuple (auth,hub):(Double,Double))


You can also compute HITS for graph treated as undirected one:

import ml.sparkling.graph.operators.OperatorsDSL._
import org.apache.spark.SparkContext
import ml.sparkling.graph.api.operators.measures.VertexMeasureConfiguration
import org.apache.spark.graphx.Graph

implicit ctx:SparkContext=???
// initialize your SparkContext as implicit value
val graph =???