netkit.classifiers.nonrelational
Class LocalMetaClassifier

java.lang.Object
  extended by netkit.classifiers.ClassifierImp
      extended by netkit.classifiers.nonrelational.LocalMetaClassifier
All Implemented Interfaces:
Classifier, Configurable
Direct Known Subclasses:
MetaMultiplicative

public abstract class LocalMetaClassifier
extends ClassifierImp

Abstract class for combining multiple classifiers. It configures itself with the list of classifiers to use and induces them individually. How to combine them is left to subclasses. It uses the Networklearning.LC_PREFIX property from the configuration details specified in the lclassifier.properties file (in addition to any properties used by the superclass).

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

Field Summary
protected  java.util.ArrayList<Classifier> lclassifiers
          The list of classifiers to combine
 
Fields inherited from class netkit.classifiers.ClassifierImp
attribute, classPrior, clsIdx, graph, keyIndex, logger, nodeType, right, tmpVector, useIntrinsic, vectorClsIdx
 
Constructor Summary
LocalMetaClassifier()
           
 
Method Summary
 void configure(Configuration config)
          Configures the classifier by getting the list of classifiers to use (comma-separated list in the NetworkLearning.LC_PREFIX property.
protected  java.lang.String getClassifierNames()
           
 Configuration getDefaultConfiguration()
          Default configuration uses only the naive Bayes classifier in addition to any defaults from the superclass
 void induceModel(Graph graph, DataSplit split)
          This induces each of the local classifiers individually.
 
Methods inherited from class netkit.classifiers.ClassifierImp
addListener, classify, classify, clearListeners, estimate, estimate, getAttributeNames, getLogger, getNofifyListeners, makeVector, notifyListeners, notifyListeners, removeListener, reset, setNofityListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface netkit.classifiers.Classifier
estimate, getDescription, getName, getShortName
 

Field Detail

lclassifiers

protected java.util.ArrayList<Classifier> lclassifiers
The list of classifiers to combine

Constructor Detail

LocalMetaClassifier

public LocalMetaClassifier()
Method Detail

getDefaultConfiguration

public Configuration getDefaultConfiguration()
Default configuration uses only the naive Bayes classifier in addition to any defaults from the superclass

Specified by:
getDefaultConfiguration in interface Configurable
Overrides:
getDefaultConfiguration in class ClassifierImp
Returns:
a default Configuration object

configure

public void configure(Configuration config)
Configures the classifier by getting the list of classifiers to use (comma-separated list in the NetworkLearning.LC_PREFIX property.

Specified by:
configure in interface Configurable
Overrides:
configure in class ClassifierImp
Parameters:
config - The configuration object to use to configure this classifier.
See Also:
netkit.classifiers.NetworkLearning.LC_PREFIX

induceModel

public void induceModel(Graph graph,
                        DataSplit split)
This induces each of the local classifiers individually. If learning need be done to learn how to combine them, then that needs to be done by subclasses.

Specified by:
induceModel in interface Classifier
Overrides:
induceModel in class ClassifierImp
Parameters:
graph - Graph whose nodes are to be estimated
split - The split between training and test. Used to get the nodetype and class attribute.

getClassifierNames

protected java.lang.String getClassifierNames()
Returns:
the list of classifier names from the configuration object when configure was called
See Also:
configure(netkit.util.Configuration)