netkit.classifiers.active
Class ComparatorLabeler

java.lang.Object
  extended by netkit.classifiers.active.PickLabelStrategyImp
      extended by netkit.classifiers.active.ComparatorLabeler
All Implemented Interfaces:
PickLabelStrategy, Configurable

public class ComparatorLabeler
extends PickLabelStrategyImp

This class does a comparison between multiple active learning strategies. Currently, the comparisons are hard-coded to compare against greedy truth. It then compares against:

Comparison shows:
  1. The rank of the greedy truth node in each of the other strategies (when applicable)
  2. The rank of the ERM top node in each of the other strategies (when applicable)
  3. The greedy truth rank for the top node in each of the other strategies
  4. The ERM rank for the top node in each of the other strategies

Author:
sofmac

Nested Class Summary
 
Nested classes/interfaces inherited from interface netkit.classifiers.active.PickLabelStrategy
PickLabelStrategy.LabelNode
 
Field Summary
 
Fields inherited from class netkit.classifiers.active.PickLabelStrategyImp
iteration, logger
 
Constructor Summary
ComparatorLabeler()
           
 
Method Summary
 void configure(Configuration config)
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 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.
protected  PickLabelStrategy.LabelNode[] pickNodes(Estimate predictions, int maxPicks)
          Maxpicks are ignored.
 
Methods inherited from class netkit.classifiers.active.PickLabelStrategyImp
getAverageRank, getAverageRank, getDefaultConfiguration, getIterationNum, getNetworkLearner, getNodesToLabel, getRank, getSplit, peek, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComparatorLabeler

public ComparatorLabeler()
Method Detail

configure

public void configure(Configuration config)
Specified by:
configure in interface Configurable
Overrides:
configure in class PickLabelStrategyImp

initialize

public void initialize(NetworkLearner nl,
                       DataSplit split)
Description copied from interface: PickLabelStrategy
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.

Specified by:
initialize in interface PickLabelStrategy
Overrides:
initialize in class PickLabelStrategyImp
Parameters:
nl - The NetworkLearner object that will be calling this strategy.
split - The initial train/test split that this will be used on

pickNodes

protected PickLabelStrategy.LabelNode[] pickNodes(Estimate predictions,
                                                  int maxPicks)
Maxpicks are ignored. We ever only look at the top-1 pick from all strategies and only follow the top pick from the

Specified by:
pickNodes in class PickLabelStrategyImp
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.

getDescription

public java.lang.String getDescription()

getName

public java.lang.String getName()

getShortName

public java.lang.String getShortName()