netkit.classifiers.relational
Interface NetworkClassifier

All Superinterfaces:
Classifier, Configurable
All Known Implementing Classes:
ClassDistribRelNeighbor, Harmonic, MetaMultiplicative, NetworkClassifierImp, NetworkMetaClassifier, NetworkOnlyBayes, NetworkWeka, ProbRelationalNeighbor, WeightedVoteRelationalNeighbor

public interface NetworkClassifier
extends Classifier

Interface for a relational classifier in addition to those of a nonrelational classifier.

Author:
Sofus A. Macskassy (sofmac@gmail.com)

Method Summary
 int classify(Node node, Estimate prior, boolean updatePrior)
          Classify a given node into one of the given classes.
 double[] estimate(Node node, Estimate prior, boolean updatePrior)
          Estimate the probabilities that a given node into belongs to any given class It may use the class estimations of other nodes and may update the prior of the given node.
 boolean estimate(Node node, Estimate prior, double[] result, boolean updatePrior)
          Estimate the probabilities that a given node into belongs to any given class It may use the class estimations of other nodes and may update the prior of the given node.
 boolean estimate(Node node, Estimate prior, Estimate result, boolean updatePrior)
          Estimate the probabilities that a given node into belongs to any given class It may use the class estimations of other nodes and may update the prior of the given node.
 void initializeRun(Estimate currPrior, Node[] unknowns)
          This is called prior to predicting labels for the unknown labels in the graph, in case the classifier needs to initialize itself.
 
Methods inherited from interface netkit.classifiers.Classifier
addListener, classify, classify, clearListeners, estimate, estimate, estimate, getDescription, getLogger, getName, getNofifyListeners, getShortName, induceModel, notifyListeners, notifyListeners, removeListener, reset, setNofityListeners
 
Methods inherited from interface netkit.util.Configurable
configure, getDefaultConfiguration
 

Method Detail

initializeRun

void initializeRun(Estimate currPrior,
                   Node[] unknowns)
This is called prior to predicting labels for the unknown labels in the graph, in case the classifier needs to initialize itself. This is called at the beginning of every iteration of a collective inference run.

Parameters:
currPrior - The current 'priors' or estimates of the unknown lables
unknowns - The list of nodes which are to be predicted in the upcoming run.

classify

int classify(Node node,
             Estimate prior,
             boolean updatePrior)
Classify a given node into one of the given classes. It may use the class estimations of other nodes and may update the prior of the given node.

Parameters:
node - The node to classify.
prior - The current class estimates of all initially unknown nodes.
updatePrior - Whether the classifier should update the prior of the node that it classifies. If true, then the prior object is updated with the predicted classification.
Returns:
The index of the class that this node is classified as. It returns -1 if it abstains.

estimate

boolean estimate(Node node,
                 Estimate prior,
                 double[] result,
                 boolean updatePrior)
Estimate the probabilities that a given node into belongs to any given class It may use the class estimations of other nodes and may update the prior of the given node.

Parameters:
node - The node to estimate.
prior - The current class estimates of all initially unknown nodes.
result - The array that is filled in with class estimates
updatePrior - Whether the classifier should update the prior of the node that it classifies. If true, then the prior object is updated with the new estimates.
Returns:
Whether the classifier abstained or inferred class probabilities

estimate

double[] estimate(Node node,
                  Estimate prior,
                  boolean updatePrior)
Estimate the probabilities that a given node into belongs to any given class It may use the class estimations of other nodes and may update the prior of the given node.

Parameters:
node - The node to estimate.
prior - The current class estimates of all initially unknown nodes.
updatePrior - Whether the classifier should update the prior of the node that it classifies. If true, then the prior object is updated with the new estimates.
Returns:
An array that is filled in with class estimates. This is null is the classifier abstains

estimate

boolean estimate(Node node,
                 Estimate prior,
                 Estimate result,
                 boolean updatePrior)
Estimate the probabilities that a given node into belongs to any given class It may use the class estimations of other nodes and may update the prior of the given node.

Parameters:
node - The node to estimate.
prior - The current class estimates of all initially unknown nodes.
result - The Estimate object that is updated with class estimates.
updatePrior - Whether the classifier should update the prior of the node that it classifies. If true, then the prior object is updated with the new estimates.
Returns:
Whether the classifier abstained or inferred class probabilities