|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.classify.Classifier
LBJ2.learn.Learner
LBJ2.learn.SparseNetworkLearner
LBJ2.learn.MultiLabelLearner
public class MultiLabelLearner
A simple implementation of a learner that learns from examples with
multiple labels and is capable of predicting multiple labels on new
examples. A separate LinearThresholdUnit is learned independently
to predict whether each label is appropriate for a given example. Any
LinearThresholdUnit may be used, so long as it implements its
clone() method and a public constructor that takes no
arguments. During testing, the classify(Object) method returns a
separate feature for each LinearThresholdUnit whose score on the
example object exceeds the threshold.
| Nested Class Summary | |
|---|---|
static class |
MultiLabelLearner.Parameters
Simply a container for all of MultiLabelLearner's configurable
parameters. |
| Field Summary |
|---|
| Fields inherited from class LBJ2.learn.SparseNetworkLearner |
|---|
baseLTU, defaultBaseLTU, network |
| Fields inherited from class LBJ2.learn.Learner |
|---|
extractor, labeler |
| Fields inherited from class LBJ2.classify.Classifier |
|---|
containingPackage, name |
| Constructor Summary | |
|---|---|
MultiLabelLearner()
Instantiates this multi-label learner with the default learning algorithm: SparsePerceptron. |
|
MultiLabelLearner(LinearThresholdUnit ltu)
Instantiates this multi-label learner using the specified algorithm to learn each class separately as a binary classifier. |
|
MultiLabelLearner(MultiLabelLearner.Parameters p)
Initializing constructor. |
|
MultiLabelLearner(java.lang.String n)
Instantiates this multi-label learner with the default learning algorithm: SparsePerceptron. |
|
MultiLabelLearner(java.lang.String n,
LinearThresholdUnit ltu)
Instantiates this multi-label learner using the specified algorithm to learn each class separately as a binary classifier. |
|
MultiLabelLearner(java.lang.String n,
MultiLabelLearner.Parameters p)
Initializing constructor. |
|
| Method Summary | |
|---|---|
FeatureVector |
classify(java.lang.Object example)
Returns a separate feature for each LinearThresholdUnit whose
score on the example object exceeds the threshold. |
java.lang.String |
getOutputType()
This learner's output type is "discrete%". |
void |
learn(java.lang.Object example)
Each example is treated as a positive example for each linear threshold unit associated with a feature produced by the labeler, and as a negative example for all other linear threshold units in the network. |
| Methods inherited from class LBJ2.learn.SparseNetworkLearner |
|---|
clone, doneLearning, forget, scores, scores, setExtractor, setLabeler, setLTU, valueOf, write |
| Methods inherited from class LBJ2.learn.Learner |
|---|
getExtractor, getLabeler, learn, save |
| Methods inherited from class LBJ2.classify.Classifier |
|---|
allowableValues, binaryRead, binaryRead, binaryRead, binaryRead, binaryWrite, binaryWrite, classify, discreteValue, discreteValueArray, getCompositeChildren, getInputType, realValue, realValueArray, test, toString, valueIndexOf |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultiLabelLearner()
SparsePerceptron.
public MultiLabelLearner(LinearThresholdUnit ltu)
ltu - The linear threshold unit used to learn binary classifiers.public MultiLabelLearner(MultiLabelLearner.Parameters p)
MultiLabelLearner.Parameters object.
p - The settings of all parameters.public MultiLabelLearner(java.lang.String n)
SparsePerceptron.
n - The name of the classifier.
public MultiLabelLearner(java.lang.String n,
LinearThresholdUnit ltu)
n - The name of the classifier.ltu - The linear threshold unit used to learn binary classifiers.
public MultiLabelLearner(java.lang.String n,
MultiLabelLearner.Parameters p)
MultiLabelLearner.Parameters object.
n - The name of the classifier.p - The settings of all parameters.| Method Detail |
|---|
public java.lang.String getOutputType()
"discrete%".
getOutputType in class Classifierpublic void learn(java.lang.Object example)
learn in class SparseNetworkLearnerexample - The example object.public FeatureVector classify(java.lang.Object example)
LinearThresholdUnit whose
score on the example object exceeds the threshold.
classify in class SparseNetworkLearnerexample - The example object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||