netkit.classifiers.active
Class ERMHybrid

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

public class ERMHybrid
extends PickLabelStrategyImp

This class duses multiple active learning strategies to pick the next candidate(s). Currently, the strategies are hardcoded. In particular, it picks the top 2.5% from the following strategies:

It then uses ERM to rank those candidates. It currently assumes that it uses the Harmonic function.

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
ERMHybrid()
           
 
Method Summary
 void configure(Configuration config)
           
 Configuration getDefaultConfiguration()
           
 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, 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

ERMHybrid

public ERMHybrid()
Method Detail

configure

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

getDefaultConfiguration

public Configuration getDefaultConfiguration()
Specified by:
getDefaultConfiguration in interface Configurable
Overrides:
getDefaultConfiguration 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()