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 doublealphaA dumping factor.private EdgeOrientationorientThe 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, getScoresMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:MatrixBasedVertexMetricObtains the values of the metric for the different users using the JBLAS library.- Specified by:
getJBLASScoresin classMatrixBasedVertexMetric<U>- Parameters:
graph- the network.- Returns:
- an array containing the value of the metric for each user.
-
getMTJScores
Description copied from class:MatrixBasedVertexMetricObtains the values of the metric for the different users using the MTJ library.- Specified by:
getMTJScoresin classMatrixBasedVertexMetric<U>- Parameters:
graph- the network.- Returns:
- an array containing the value of the metric for each user.
-
getCOLTScores
Description copied from class:MatrixBasedVertexMetricObtains the values of the metric for the different users using the COLT library.- Specified by:
getCOLTScoresin classMatrixBasedVertexMetric<U>- Parameters:
graph- the network.- Returns:
- an array containing the value of the metric for each user.
-