netkit.classifiers.relational
Class ProbRelationalNeighbor

java.lang.Object
  extended by netkit.classifiers.ClassifierImp
      extended by netkit.classifiers.relational.NetworkClassifierImp
          extended by netkit.classifiers.relational.ProbRelationalNeighbor
All Implemented Interfaces:
Classifier, NetworkClassifier, Configurable

public final class ProbRelationalNeighbor
extends NetworkClassifierImp

This is a probablistic version of wbRN and it estimates nodes by using a Bayesian combination of the neighbors edges.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class netkit.classifiers.relational.NetworkClassifierImp
NetworkClassifierImp.Aggregation
 
Field Summary
 
Fields inherited from class netkit.classifiers.relational.NetworkClassifierImp
aggFactory, aggregation, aggregators, aggTypes, dynamicAggregators, prior
 
Fields inherited from class netkit.classifiers.ClassifierImp
attribute, classPrior, clsIdx, graph, keyIndex, logger, nodeType, right, tmpVector, useIntrinsic, vectorClsIdx
 
Constructor Summary
ProbRelationalNeighbor()
           
 
Method Summary
 void configure(Configuration conf)
          This does not use the configuration.
 boolean doEstimate(Node node, double[] estimation)
          Estimate the label of this node by using a naive Bayesian combination of the neighbor nodes.
 Configuration getDefaultConfiguration()
          Default configuration for relational learners.
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 java.lang.String getShortName()
           
 java.lang.String toString()
           
 
Methods inherited from class netkit.classifiers.relational.NetworkClassifierImp
classify, estimate, estimate, estimate, estimate, generateAggregators, getAttributeNames, includeClassAttribute, induceModel, initializeRun, makeVector
 
Methods inherited from class netkit.classifiers.ClassifierImp
addListener, classify, classify, clearListeners, estimate, estimate, getLogger, getNofifyListeners, notifyListeners, notifyListeners, removeListener, reset, setNofityListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface netkit.classifiers.Classifier
addListener, classify, classify, clearListeners, estimate, estimate, getLogger, getNofifyListeners, notifyListeners, notifyListeners, removeListener, reset, setNofityListeners
 

Constructor Detail

ProbRelationalNeighbor

public ProbRelationalNeighbor()
Method Detail

getShortName

public java.lang.String getShortName()
Returns:
"pRN"

getName

public java.lang.String getName()
Returns:
"Probablistic Relational Neighbor NetworkClassifier (pRN)"

getDescription

public java.lang.String getDescription()

getDefaultConfiguration

public Configuration getDefaultConfiguration()
Description copied from class: NetworkClassifierImp
Default configuration for relational learners. This sets aggregation to be only for the class attribute, to use intrinsic variables and to use the mode, ratio and mean aggregators.

These are also the configuration objects that are set in this instance. If a classifier needs more, then it should override this (remembering to call super.getDefaultConfiguration() if needed) to set other default configuration options.

Specified by:
getDefaultConfiguration in interface Configurable
Overrides:
getDefaultConfiguration in class NetworkClassifierImp
Returns:
an empty configuration

configure

public void configure(Configuration conf)
This does not use the configuration. It configures pRN to the only way it works: no intrinsics, no aggregation (because it uses its own aggregation rather than what the super class does), and it uses the 'ratio' aggregator although that is also ignored here.

Specified by:
configure in interface Configurable
Overrides:
configure in class NetworkClassifierImp
Parameters:
conf - ignored
See Also:
NetworkClassifierImp.aggregation

doEstimate

public boolean doEstimate(Node node,
                          double[] estimation)
Estimate the label of this node by using a naive Bayesian combination of the neighbor nodes.

Specified by:
doEstimate in class NetworkClassifierImp
Parameters:
node - The node whose label to estimate
estimation - Array to put the result of the estimate
Returns:
true

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object