public class NormalizedMutualInformation extends CommunityRelativeMeasure
referenceCommunities, referenceMarker
communities, graph, graphChanged, M, marker
Constructor and Description |
---|
NormalizedMutualInformation(String marker)
New NMI measure, using the given marker for the dynamically performed
assignment, and the default marker for the reference assignment.
|
NormalizedMutualInformation(String marker,
String referenceMarker)
New NMI measure, using the given marker for the dynamically performed
assignment, and the given refrenceMarker for the reference assignment.
|
Modifier and Type | Method and Description |
---|---|
void |
compute()
Compute the new NMI measure value.
|
protected int[][] |
confusionMatrix()
Computes the confusion matrix between reference and current community
assignment, i.e. the matrix N where each element N[i][j] is the number of
nodes in reference community i, also in current community j.
|
initialize, nodeAdded, nodeAttributeChanged, nodeRemoved
assignNode, edgeAdded, edgeRemoved, getLastComputedValue, getMeasure, graphCleared, init, nodeAttributeAdded, terminate, unassignNode
edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeRemoved, stepBegins
public NormalizedMutualInformation(String marker)
marker
- name of the attribute marking the computed communities.public NormalizedMutualInformation(String marker, String referenceMarker)
marker
- name of the attribute marking the computed communities.referenceMarker
- name of the attribute marking the reference communities.public void compute()
compute
in interface Algorithm
compute
in class CommunityRelativeMeasure
Algorithm.init(Graph)
protected int[][] confusionMatrix()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses