Class KatzCentrality<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.vertex.MatrixBasedVertexMetric<U>
es.uam.eps.ir.relison.sna.metrics.vertex.KatzCentrality<U>
- All Implemented Interfaces:
VertexMetric<U>
public class KatzCentrality<U> extends MatrixBasedVertexMetric<U>
Finds the Katz centrality of the nodes, which estimates the importance of a node considering the
paths between the node and the rest of the network.
Katz centrality of the nodes.
Reference: Katz, L. A new status index derived from sociometric analysis. Psychometrika 18(1), pp. 33-43 (1953)
-
Field Summary
Fields Modifier and Type Field Description private double
alpha
A dumping factor.private EdgeOrientation
orient
The orientation of the paths. -
Constructor Summary
Constructors Constructor Description KatzCentrality(double alpha)
Constructor.KatzCentrality(EdgeOrientation orient, double alpha)
Constructor.KatzCentrality(MatrixLibrary library, double alpha)
Constructor.KatzCentrality(MatrixLibrary library, EdgeOrientation orient, double alpha)
Constructor. -
Method Summary
Modifier and Type Method Description protected double[]
getCOLTScores(Graph<U> graph)
Obtains the values of the metric for the different users using the COLT library.protected double[]
getJBLASScores(Graph<U> graph)
Obtains the values of the metric for the different users using the JBLAS library.protected double[]
getMTJScores(Graph<U> graph)
Obtains the values of the metric for the different users using the MTJ library.Methods inherited from class es.uam.eps.ir.relison.sna.metrics.vertex.MatrixBasedVertexMetric
compute, compute, compute, getScores
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.relison.sna.metrics.VertexMetric
averageValue, averageValue
-
Field Details
-
Constructor Details
-
KatzCentrality
Constructor.- Parameters:
library
- the matrix library to use.orient
- the orientation to choose for the adjacency matrix.alpha
- the dumping factor for paths at large distances.
-
KatzCentrality
Constructor. By default, it considers the paths leading to the user.- Parameters:
library
- the matrix library to use.alpha
- the dumping factor for paths at large distances.
-
KatzCentrality
Constructor. It uses the default matrix libraries.- Parameters:
orient
- the orientation to choose for the adjacency matrix.alpha
- the dumping factor for paths at large distances.
-
KatzCentrality
public KatzCentrality(double alpha)Constructor. It uses the default matrix libraries and considers the paths leading to the users.- Parameters:
alpha
- the dumping factor for paths at large distances.
-
-
Method Details
-
getJBLASScores
Description copied from class:MatrixBasedVertexMetric
Obtains the values of the metric for the different users using the JBLAS library.- Specified by:
getJBLASScores
in classMatrixBasedVertexMetric<U>
- Parameters:
graph
- the network.- Returns:
- an array containing the value of the metric for each user.
-
getMTJScores
Description copied from class:MatrixBasedVertexMetric
Obtains the values of the metric for the different users using the MTJ library.- Specified by:
getMTJScores
in classMatrixBasedVertexMetric<U>
- Parameters:
graph
- the network.- Returns:
- an array containing the value of the metric for each user.
-
getCOLTScores
Description copied from class:MatrixBasedVertexMetric
Obtains the values of the metric for the different users using the COLT library.- Specified by:
getCOLTScores
in classMatrixBasedVertexMetric<U>
- Parameters:
graph
- the network.- Returns:
- an array containing the value of the metric for each user.
-