|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.classify.Classifier
LBJ2.learn.Learner
public abstract class Learner
Extend this class to create a new Classifier that learns to mimic
one an oracle classifier given a feature extracting classifier and example
objects.
| Field Summary | |
|---|---|
protected Classifier |
extractor
Stores the classifiers used to produce features. |
protected Classifier |
labeler
Stores the classifier used to produce labels. |
| Fields inherited from class LBJ2.classify.Classifier |
|---|
containingPackage, name |
| Constructor Summary | |
|---|---|
protected |
Learner()
This constructor is used by the LBJ2 compiler; it should never be called by a programmer. |
protected |
Learner(java.lang.String n)
Initializes the name. |
protected |
Learner(java.lang.String n,
Classifier e)
Constructor for unsupervised learning. |
protected |
Learner(java.lang.String n,
Classifier l,
Classifier e)
Constructor for supervised learning. |
| Method Summary | |
|---|---|
void |
doneLearning()
Overridden by subclasses to perform any required post-processing computations after all training examples have been observed through learn(Object) and learn(Object[]). |
abstract void |
forget()
Overridden by subclasses to reinitialize the learner to the state it started at before any learning was performed. |
Classifier |
getExtractor()
Returns the extractor. |
Classifier |
getLabeler()
Returns the labeler. |
abstract void |
learn(java.lang.Object example)
Trains the learning algorithm given an object as an example. |
void |
learn(java.lang.Object[] examples)
Trains the learning algorithm given many objects as examples. |
void |
save()
Overridden by subclasses to store a binary representation of this learner in a pre-defined location. |
abstract ScoreSet |
scores(java.lang.Object example)
Produces a set of scores indicating the degree to which each possible discrete classification value is associated with the given example object. |
void |
setExtractor(Classifier e)
Sets the extractor. |
void |
setLabeler(Classifier l)
Sets the labeler. |
abstract void |
write(java.io.PrintStream out)
Writes the algorithm's internal representation as text. |
| Methods inherited from class LBJ2.classify.Classifier |
|---|
allowableValues, binaryRead, binaryRead, binaryRead, binaryRead, binaryWrite, binaryWrite, classify, classify, clone, discreteValue, discreteValueArray, getCompositeChildren, getInputType, getOutputType, realValue, realValueArray, test, toString, valueIndexOf |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Classifier labeler
protected Classifier extractor
| Constructor Detail |
|---|
protected Learner()
protected Learner(java.lang.String n)
n - The name of the classifier.
protected Learner(java.lang.String n,
Classifier e)
n - The name of the classifier.e - The feature extracting classifier.
protected Learner(java.lang.String n,
Classifier l,
Classifier e)
n - The name of the classifier.l - The labeling classifier.e - The feature extracting classifier.| Method Detail |
|---|
public Classifier getLabeler()
public void setLabeler(Classifier l)
l - A labeling classifier.public Classifier getExtractor()
public void setExtractor(Classifier e)
e - A feature extracting classifier.public abstract void learn(java.lang.Object example)
example - An example of the desired learned classifier's behavior.public void learn(java.lang.Object[] examples)
learn(Object) on each of the
objects in the input array. It should be overridden if there is a more
efficient implementation.
examples - Examples of the desired learned classifier's behavior.public void doneLearning()
learn(Object) and learn(Object[]). By default this
method does nothing.
public abstract void forget()
public void save()
public abstract ScoreSet scores(java.lang.Object example)
real feature or more than
one feature may implement this method by simply returning
null.
example - The object to make decisions about.
public abstract void write(java.io.PrintStream out)
out - The output stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||