netkit.classifiers.active
Interface PickLabelStrategy

All Superinterfaces:
Configurable
All Known Implementing Classes:
ComparatorLabeler, EmpiricalRiskMinimization, EmpiricalRiskMinimizationHarmonic, ERMHybrid, GraphCentralityLabeling, GreedyTruth, PickLabelStrategyImp, RandomLabeling, UncertaintyLabeling

public interface PickLabelStrategy
extends Configurable


Nested Class Summary
static class PickLabelStrategy.LabelNode
           
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 PickLabelStrategy.LabelNode[] getNodesToLabel(DataSplit currentSplit, Estimate currentPredictions, int maxPicks)
          Get the list of nodes to get labels for.
 double getRank(DataSplit currentSplit, Estimate currentPredictions, Node node)
          Get the rank of the given node if the strategy were to pick the node.
 java.lang.String getShortName()
           
 void initialize(NetworkLearner nl, DataSplit split)
          Initialize the label strategy by providing a reference to the NetworkLeaner object that calls the strategy, thereby giving it access to all information it is likely to need.
 PickLabelStrategy.LabelNode[] peek(DataSplit currentSplit, Estimate currentPredictions, int numPeek)
          Get the list of nodes to get labels for...
 
Methods inherited from interface netkit.util.Configurable
configure, getDefaultConfiguration
 

Method Detail

peek

PickLabelStrategy.LabelNode[] peek(DataSplit currentSplit,
                                   Estimate currentPredictions,
                                   int numPeek)
Get the list of nodes to get labels for... without changing the internal state of the active labeler.

Parameters:
currentSplit - Current datasplit
currentPredictions - Current predictions of the classifier
numPicks - how many nodes should it peek at
Returns:
An array of Node objects that should receive labels. null is returned if done.
Throws:
java.lang.UnsupportedOperationException - if this is not supported

getRank

double getRank(DataSplit currentSplit,
               Estimate currentPredictions,
               Node node)
Get the rank of the given node if the strategy were to pick the node. If more than one node has the same score, then average their ranks (hence a double is returned)

Parameters:
currentSplit - Current datasplit
currentPredictions - Current predictions of the classifier
node - the node whose rank is requested
Returns:
the rank of the given node or Double.NaN if the node is not in the rankings. If more than one node has the same score, then average their ranks (hence a double is returned)
Throws:
java.lang.UnsupportedOperationException - if this is not supported

getNodesToLabel

PickLabelStrategy.LabelNode[] getNodesToLabel(DataSplit currentSplit,
                                              Estimate currentPredictions,
                                              int maxPicks)
Get the list of nodes to get labels for.

Parameters:
currentSplit - Current datasplit
currentPredictions - Current predictions of the classifier
maxPicks - how many nodes should it pick at maximum (this iteration)
Returns:
An array of Node objects that should receive labels. null is returned if done.

initialize

void initialize(NetworkLearner nl,
                DataSplit split)
Initialize the label strategy by providing a reference to the NetworkLeaner object that calls the strategy, thereby giving it access to all information it is likely to need. This should re-initialize the strategy if it has any cached values from prior calls.

Parameters:
nl - The NetworkLearner object that will be calling this strategy.
split - The initial train/test split that this will be used on

getShortName

java.lang.String getShortName()

getName

java.lang.String getName()

getDescription

java.lang.String getDescription()