netkit.classifiers.active
Class EmpiricalRiskMinimization

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

public class EmpiricalRiskMinimization
extends PickLabelStrategyImp


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
EmpiricalRiskMinimization()
           
 
Method Summary
static double computeEmpiricalRisk(Estimate predictions)
          Compute the empirical risk for a specific set of predictions using the standard empirical risk formulation: risk(predictions) = sum over x in testset: argmin_i [ 1-f(x,i) ], where f(x,i) is the probability that x belongs to class i.
 void configure(Configuration config)
           
 Configuration getDefaultConfiguration()
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 java.lang.String getShortName()
           
protected  PickLabelStrategy.LabelNode[] pickNodes(Estimate predictions, int maxPicks)
          Get the next nodes to label based on the empirical risk minimization principle.
 
Methods inherited from class netkit.classifiers.active.PickLabelStrategyImp
getAverageRank, getAverageRank, getIterationNum, getNetworkLearner, getNodesToLabel, getRank, getSplit, initialize, peek, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmpiricalRiskMinimization

public EmpiricalRiskMinimization()
Method Detail

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

computeEmpiricalRisk

public static double computeEmpiricalRisk(Estimate predictions)
Compute the empirical risk for a specific set of predictions using the standard empirical risk formulation:
risk(predictions) = sum over x in testset: argmin_i [ 1-f(x,i) ],
where f(x,i) is the probability that x belongs to class i.

Parameters:
predictions -
Returns:
the risk of these computations

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.

getDescription

public java.lang.String getDescription()

getName

public java.lang.String getName()

getShortName

public java.lang.String getShortName()