public class MultiLabelLearner extends SparseNetworkLearner
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 Learner.classify(Object)
method returns a separate feature for each LinearThresholdUnit whose score on the example
object exceeds the threshold.| Modifier and Type | Class and Description |
|---|---|
static class |
MultiLabelLearner.Parameters
Simply a container for all of
MultiLabelLearner's configurable parameters. |
baseLTU, conjunctiveLabels, defaultBaseLTU, network, numExamples, numFeaturescandidates, encoding, extractor, labeler, labelLexicon, lcFilePath, lexFilePath, lexicon, lossFlag, predictions, readLexiconOnDemandcontainingPackage, name| Constructor and Description |
|---|
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(String n)
Instantiates this multi-label learner with the default learning algorithm:
SparsePerceptron. |
MultiLabelLearner(String n,
LinearThresholdUnit ltu)
Instantiates this multi-label learner using the specified algorithm to learn each class
separately as a binary classifier.
|
MultiLabelLearner(String n,
MultiLabelLearner.Parameters p)
Initializing constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FeatureVector |
classify(int[] exampleFeatures,
double[] exampleValues)
Returns a separate feature for each
LinearThresholdUnit whose score on the example
object exceeds the threshold. |
String |
getOutputType()
This learner's output type is
"discrete%". |
Learner.Parameters |
getParameters()
Retrieves the parameters that are set in this learner.
|
clone, conjunctiveScores, conjunctiveValueOf, discreteValue, doneLearning, doneWithRound, featureValue, forget, getBaseLTU, getLTU, getNetwork, getNumExamples, getNumFeatures, initialize, isUsingConjunctiveLabels, learn, read, scores, scores, scores, setExtractor, setLabeler, setLTU, setNetworkLabel, setParameters, valueOf, valueOf, write, writeclassify, classify, classify, classify, countFeatures, createPrediction, createPrediction, demandLexicon, discreteValue, discreteValue, emptyClone, featureValue, featureValue, getCurrentLexicon, getExampleArray, getExampleArray, getExtractor, getLabeler, getLabelLexicon, getLexicon, getLexiconDiscardCounts, getLexiconLocation, getModelLocation, getPrunedLexiconSize, learn, learn, learn, learn, read, readLabelLexicon, readLearner, readLearner, readLearner, readLearner, readLearner, readLearner, readLexicon, readLexicon, readLexiconOnDemand, readLexiconOnDemand, readModel, readModel, readParameters, realValue, realValue, realValue, save, saveLexicon, saveModel, scores, scores, scoresAugmented, setCandidates, setEncoding, setLabelLexicon, setLexicon, setLexiconLocation, setLexiconLocation, setLossFlag, setModelLocation, setModelLocation, setParameters, setReadLexiconOnDemand, unclone, unsetLossFlag, write, writeLexicon, writeModel, writeParametersallowableValues, classify, discreteValueArray, getCompositeChildren, getInputType, realValueArray, test, toString, valueIndexOfpublic 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(String n)
SparsePerceptron.n - The name of the classifier.public MultiLabelLearner(String n, LinearThresholdUnit ltu)
n - The name of the classifier.ltu - The linear threshold unit used to learn binary classifiers.public MultiLabelLearner(String n, MultiLabelLearner.Parameters p)
MultiLabelLearner.Parameters object.n - The name of the classifier.p - The settings of all parameters.public Learner.Parameters getParameters()
getParameters in class SparseNetworkLearnerpublic String getOutputType()
"discrete%".getOutputType in class Classifierpublic FeatureVector classify(int[] exampleFeatures, double[] exampleValues)
LinearThresholdUnit whose score on the example
object exceeds the threshold.classify in class SparseNetworkLearnerexampleFeatures - The example's feature indices.exampleValues - The feature values.Copyright © 2016. All rights reserved.