netkit.classifiers
Class ClassifierImp

java.lang.Object
  extended by netkit.classifiers.ClassifierImp
All Implemented Interfaces:
Classifier, Configurable
Direct Known Subclasses:
ClassPrior, ExternalPrior, LocalMetaClassifier, LocalWeka, NetworkClassifierImp, NullPrior, UniformPrior

public abstract class ClassifierImp
extends java.lang.Object
implements Classifier

$Id: ClassifierImp.java,v 1.6 2007/03/26 23:45:06 sofmac Exp $ Part of the open-source Network Learning Toolkit

User: smacskassy Date: Dec 2, 2004 Time: 9:16:44 PM


Field Summary
protected  AttributeCategorical attribute
           
protected  double[] classPrior
           
protected  int clsIdx
           
protected  Graph graph
           
protected  int keyIndex
           
 java.util.logging.Logger logger
           
protected  java.lang.String nodeType
           
protected  int right
           
protected  double[] tmpVector
           
protected  boolean useIntrinsic
           
protected  int vectorClsIdx
           
 
Constructor Summary
ClassifierImp()
           
 
Method Summary
 void addListener(ClassifierListener cl)
           
 int classify(Node node)
           
 boolean classify(Node node, Classification result)
           
 void clearListeners()
           
 void configure(Configuration config)
           
 double[] estimate(Node node)
           
 boolean estimate(Node node, Estimate result)
           
protected  java.lang.String[] getAttributeNames()
           
 Configuration getDefaultConfiguration()
           
 java.util.logging.Logger getLogger()
           
 boolean getNofifyListeners()
           
 void induceModel(Graph graph, DataSplit split)
           
protected  void makeVector(Node node, double[] vector)
           
 void notifyListeners(Node node, double[] estimate)
           
 void notifyListeners(Node node, int classification)
           
 void removeListener(ClassifierListener cl)
           
 void reset()
           
 void setNofityListeners(boolean notify)
           
 
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

logger

public final java.util.logging.Logger logger

tmpVector

protected double[] tmpVector

attribute

protected AttributeCategorical attribute

nodeType

protected java.lang.String nodeType

graph

protected Graph graph

clsIdx

protected int clsIdx

vectorClsIdx

protected int vectorClsIdx

keyIndex

protected int keyIndex

right

protected int right

useIntrinsic

protected boolean useIntrinsic

classPrior

protected double[] classPrior
Constructor Detail

ClassifierImp

public ClassifierImp()
Method Detail

reset

public void reset()
Specified by:
reset in interface Classifier

getLogger

public java.util.logging.Logger getLogger()
Specified by:
getLogger in interface Classifier

getDefaultConfiguration

public Configuration getDefaultConfiguration()
Specified by:
getDefaultConfiguration in interface Configurable

configure

public void configure(Configuration config)
Specified by:
configure in interface Configurable

estimate

public final double[] estimate(Node node)
Specified by:
estimate in interface Classifier

estimate

public final boolean estimate(Node node,
                              Estimate result)
Specified by:
estimate in interface Classifier

classify

public final int classify(Node node)
Specified by:
classify in interface Classifier

classify

public final boolean classify(Node node,
                              Classification result)
Specified by:
classify in interface Classifier

induceModel

public void induceModel(Graph graph,
                        DataSplit split)
Specified by:
induceModel in interface Classifier

getAttributeNames

protected java.lang.String[] getAttributeNames()

makeVector

protected void makeVector(Node node,
                          double[] vector)

addListener

public final void addListener(ClassifierListener cl)
Specified by:
addListener in interface Classifier

clearListeners

public final void clearListeners()
Specified by:
clearListeners in interface Classifier

removeListener

public final void removeListener(ClassifierListener cl)
Specified by:
removeListener in interface Classifier

getNofifyListeners

public final boolean getNofifyListeners()
Specified by:
getNofifyListeners in interface Classifier

setNofityListeners

public final void setNofityListeners(boolean notify)
Specified by:
setNofityListeners in interface Classifier

notifyListeners

public final void notifyListeners(Node node,
                                  double[] estimate)
Specified by:
notifyListeners in interface Classifier

notifyListeners

public final void notifyListeners(Node node,
                                  int classification)
Specified by:
notifyListeners in interface Classifier