public abstract class SequenceClassificationLearningAlgorithm extends Object implements LearningAlgorithm, MetaLearningAlgorithm
Example and
associated to one Label) this class allow to apply a generic
LearningAlgorithm to use the "history" of each item in the
sequence in order to improve the classification quality. In other words, the
classification of each example does not depend only its representation, but
it also depend on its "history", in terms of the classed assigned to the
preceding examples. | Constructor and Description |
|---|
SequenceClassificationLearningAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
LearningAlgorithm |
getBaseLearningAlgorithm() |
int |
getBeamSize() |
List<Label> |
getLabels()
Returns the labels representing the concept to be learned.
|
int |
getMaxEmissionCandidates() |
SequencePredictionFunction |
getPredictionFunction()
Returns the predictionFunction learned during the training process
|
SequenceExampleGenerator |
getSequenceExampleGenerator() |
int |
getTransitionsOrder() |
void |
learn(Dataset dataset)
It starts the training process exploiting the provided
dataset |
void |
reset()
Resets all the learning process, returning to the default state.
|
void |
setBaseLearningAlgorithm(LearningAlgorithm baseLearningAlgorithm) |
void |
setBeamSize(int beamSize) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be learned.
|
void |
setMaxEmissionCandidates(int maxEmissionCandidates) |
void |
setSequenceExampleGenerator(SequenceExampleGenerator sequenceExampleGenerator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBaseAlgorithm, setBaseAlgorithmduplicatepublic SequenceClassificationLearningAlgorithm()
public LearningAlgorithm getBaseLearningAlgorithm()
public int getBeamSize()
public List<Label> getLabels()
LearningAlgorithmgetLabels in interface LearningAlgorithmpublic int getMaxEmissionCandidates()
public SequencePredictionFunction getPredictionFunction()
LearningAlgorithmgetPredictionFunction in interface LearningAlgorithmpublic SequenceExampleGenerator getSequenceExampleGenerator()
public int getTransitionsOrder()
n of elements (in the sequence) whose
labels are to be considered to enrich a targeted elementpublic void learn(Dataset dataset)
LearningAlgorithmdatasetlearn in interface LearningAlgorithmdataset - the training datapublic void reset()
LearningAlgorithmreset in interface LearningAlgorithmpublic void setBaseLearningAlgorithm(LearningAlgorithm baseLearningAlgorithm)
baseLearningAlgorithm - the learning algorithm devoted to the acquisition of a model
after that each example has been enriched with its "history"public void setBeamSize(int beamSize)
beamSize - The size of the beam to be used in the decoding process. This
number determines the number of possible sequences produced in
the labeling process. It will also increase the process
complexity. SequencePredictionFunction object returned from
the method getPredictionFunctionpublic void setLabels(List<Label> labels)
LearningAlgorithmsetLabels in interface LearningAlgorithmlabels - the labels representing the concept to be learnedpublic void setMaxEmissionCandidates(int maxEmissionCandidates)
maxEmissionCandidates - During the labeling process, each item is classified with
respect to the target classes. To reduce the complexity of the
labeling process, this variable determines the number of
classes that received the highest classification scores to be
considered after the classification step in the Viterbi
Decoding.SequencePredictionFunction object returned from
the method getPredictionFunctionpublic void setSequenceExampleGenerator(SequenceExampleGenerator sequenceExampleGenerator)
sequenceExampleGenerator - the class that generates examples enriched with information
derived from their "history"Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.