netkit.classifiers.active
Class EmpiricalRiskMinimizationHarmonic
java.lang.Object
netkit.classifiers.active.PickLabelStrategyImp
netkit.classifiers.active.EmpiricalRiskMinimizationHarmonic
- All Implemented Interfaces:
- PickLabelStrategy, Configurable
public class EmpiricalRiskMinimizationHarmonic
- extends PickLabelStrategyImp
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EmpiricalRiskMinimizationHarmonic
public EmpiricalRiskMinimizationHarmonic()
getDefaultConfiguration
public Configuration getDefaultConfiguration()
- Specified by:
getDefaultConfiguration
in interface Configurable
- Overrides:
getDefaultConfiguration
in class PickLabelStrategyImp
configure
public void configure(Configuration config)
- Specified by:
configure
in interface Configurable
- Overrides:
configure
in class PickLabelStrategyImp
peek
public PickLabelStrategy.LabelNode[] peek(DataSplit split,
Estimate predictions,
int maxPicks)
- Description copied from interface:
PickLabelStrategy
- Get the list of nodes to get labels for... without changing the internal state of the
active labeler.
- Specified by:
peek
in interface PickLabelStrategy
- Overrides:
peek
in class PickLabelStrategyImp
- Parameters:
split
- Current datasplitpredictions
- Current predictions of the classifier
- Returns:
- An array of Node objects that should receive labels.
null
is returned if done.
getRank
public double getRank(DataSplit split,
Estimate predictions,
Node node)
- Description copied from interface:
PickLabelStrategy
- 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)
- Specified by:
getRank
in interface PickLabelStrategy
- Overrides:
getRank
in class PickLabelStrategyImp
- Parameters:
split
- Current datasplitpredictions
- Current predictions of the classifiernode
- 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)
pickNodes
protected PickLabelStrategy.LabelNode[] pickNodes(Estimate predictions,
int maxPicks)
- Get the next nodes to label based on the empirical risk minimization principle.
- 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.
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
getDescription
public java.lang.String getDescription()
getName
public java.lang.String getName()
getShortName
public java.lang.String getShortName()