|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectClassifier
public abstract class Classifier
The Classifier class represents an algorithm for classifying the instances of a particular machine learning problem. Classifier is an abstract class, so actual classification algorithms are implemented by extending this class and implementing the abstract methods.
Field Summary | |
---|---|
static java.lang.String |
missingData
|
static java.lang.String |
unknownClass
|
Constructor Summary | |
---|---|
Classifier(AttributeSet attributeSet)
|
Method Summary | |
---|---|
abstract java.util.Hashtable<java.lang.String,java.lang.Double> |
computeClassProbabilities(Instance instance)
|
double |
computeErrorRate(InstanceSet testSet)
|
abstract java.lang.String |
decide(Instance instance)
|
AttributeSet |
getAttributeSet()
|
abstract void |
learn(InstanceSet trainingSet)
Learn a classifier from the given training set |
static void |
main(java.lang.String[] arguments)
Run a user-selected algorithm on a user-selected data file |
abstract void |
print()
print out a legible form of the classifier |
void |
printDecisionsAndProbabilities(InstanceSet testSet)
Print out the decision (i.e. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String missingData
public static final java.lang.String unknownClass
Constructor Detail |
---|
public Classifier(AttributeSet attributeSet)
attributeSet
- the set of attributes to be used by this classifierMethod Detail |
---|
public abstract void learn(InstanceSet trainingSet) throws java.lang.Exception
trainingSet
- the training set from which to learn the classifier
java.lang.Exception
public abstract java.lang.String decide(Instance instance) throws java.lang.Exception
instance
- the instance whose class is to be decided
java.lang.Exception
public abstract java.util.Hashtable<java.lang.String,java.lang.Double> computeClassProbabilities(Instance instance) throws java.lang.Exception
instance
- the instance whose class probabilities are to be computed
java.lang.Exception
public abstract void print() throws java.lang.Exception
java.lang.Exception
public double computeErrorRate(InstanceSet testSet) throws java.lang.Exception
testSet
- the test set on which the error rate will be computed
java.lang.Exception
public void printDecisionsAndProbabilities(InstanceSet testSet) throws java.lang.Exception
testSet
- the test set whose decision and probabilities should be
printed out
java.lang.Exception
public static void main(java.lang.String[] arguments)
arguments
- OneR|Bayes|Stump|Tree datafilenamepublic AttributeSet getAttributeSet()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |