|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.meta.ND
Nested Class Summary | |
protected class |
ND.NDTree
|
Field Summary | |
protected Classifier |
m_classifier
The base classifier . |
protected java.util.Hashtable |
m_classifiers
The hashtable containing all the classifiers |
protected boolean |
m_hashtablegiven
Is Hashtable given from END? |
protected ND.NDTree |
m_ndtree
The tree of classes |
protected int |
m_seed
The random number seed used |
Fields inherited from class weka.classifiers.Classifier |
m_Debug |
Constructor Summary | |
ND()
|
Method Summary | |
void |
buildClassifier(Instances data)
Builds the classifier. |
void |
buildClassifierForNode(ND.NDTree node,
Instances data)
Builds the classifier for one node. |
double[] |
distributionForInstance(Instance inst)
Predicts the class distribution for a given instance |
protected double[] |
distributionForInstance(Instance inst,
ND.NDTree node)
Predicts the class distribution for a given instance |
Classifier |
getClassifier()
Get the classifier used as the classifier |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
int |
getSeed()
Gets the random number seed. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
void |
setClassifier(Classifier newClassifier)
Set the base classifier. |
void |
setHashtable(java.util.Hashtable table)
Set hashtable from END. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSeed(int seed)
Sets the seed for random number generation. |
java.lang.String |
toString()
Outputs the classifier as a string. |
Methods inherited from class weka.classifiers.Classifier |
classifyInstance, debugTipText, forName, getDebug, makeCopies, setDebug |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected ND.NDTree m_ndtree
protected java.util.Hashtable m_classifiers
protected int m_seed
protected Classifier m_classifier
protected boolean m_hashtablegiven
Constructor Detail |
public ND()
Method Detail |
public void setHashtable(java.util.Hashtable table)
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class Classifier
data
- set of instances serving as training data
java.lang.Exception
- if the classifier has not been
generated successfullypublic void buildClassifierForNode(ND.NDTree node, Instances data) throws java.lang.Exception
java.lang.Exception
public double[] distributionForInstance(Instance inst) throws java.lang.Exception
distributionForInstance
in class Classifier
inst
- the (multi-class) instance to be classified
java.lang.Exception
- if distribution could not be
computed successfullyprotected double[] distributionForInstance(Instance inst, ND.NDTree node) throws java.lang.Exception
inst
- the (multi-class) instance to be classified
java.lang.Exception
public void setSeed(int seed)
setSeed
in interface Randomizable
seed
- the random number seedpublic int getSeed()
getSeed
in interface Randomizable
public void setClassifier(Classifier newClassifier)
newClassifier
- the Classifier to use.public Classifier getClassifier()
public java.lang.String toString()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-W classname
Specify the full class name of a learner as the basis for
the multiclassclassifier (required).
-Q seed
Random number seed (default 1).
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public static void main(java.lang.String[] argv)
argv
- the options
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |