netkit.classifiers.active.graphfunctions
Class LabelClosenessRank

java.lang.Object
  extended by netkit.classifiers.active.graphfunctions.ScoringFunction
      extended by netkit.classifiers.active.graphfunctions.ReverseScoringFunction
          extended by netkit.classifiers.active.graphfunctions.LabelClosenessRank
All Implemented Interfaces:
java.util.Comparator<PickLabelStrategy.LabelNode>

public class LabelClosenessRank
extends ReverseScoringFunction

For label closeness, we want to pick the largest closeness first, so that means we reverse normal sorting order


Field Summary
 
Fields inherited from class netkit.classifiers.active.graphfunctions.ScoringFunction
gm, labeler, labels
 
Constructor Summary
LabelClosenessRank()
           
 
Method Summary
 boolean clusterBased()
          Is this scoring function cluster based (does it need clustering).
 double score(ModularityClusterer.Cluster c, Node n)
           
 java.lang.String toString()
           
 double update(ModularityClusterer.Cluster c, double currentScore, Node n, Node[] newPicks)
          Return the new score of a node given its old score and a newly labeled node.
 boolean updateable()
          returns whether the score of a node will change if more nodes are labeled.
 
Methods inherited from class netkit.classifiers.active.graphfunctions.ReverseScoringFunction
bestScore, compare, worstScore
 
Methods inherited from class netkit.classifiers.active.graphfunctions.ScoringFunction
compare, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

LabelClosenessRank

public LabelClosenessRank()
Method Detail

clusterBased

public boolean clusterBased()
Description copied from class: ScoringFunction
Is this scoring function cluster based (does it need clustering).

Overrides:
clusterBased in class ScoringFunction
Returns:
false (default)

toString

public java.lang.String toString()
Specified by:
toString in class ScoringFunction

score

public double score(ModularityClusterer.Cluster c,
                    Node n)
Specified by:
score in class ScoringFunction

update

public double update(ModularityClusterer.Cluster c,
                     double currentScore,
                     Node n,
                     Node[] newPicks)
Description copied from class: ScoringFunction
Return the new score of a node given its old score and a newly labeled node. By default a scoring function is not updateable and will just return the current score.

Overrides:
update in class ScoringFunction
Returns:
the current score.

updateable

public boolean updateable()
Description copied from class: ScoringFunction
returns whether the score of a node will change if more nodes are labeled. The default is that a scoring function is not updateable.

Overrides:
updateable in class ScoringFunction
Returns:
false.