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, wait
getBaseAlgorithm, setBaseAlgorithm
duplicate
public SequenceClassificationLearningAlgorithm()
public LearningAlgorithm getBaseLearningAlgorithm()
public int getBeamSize()
public List<Label> getLabels()
LearningAlgorithm
getLabels
in interface LearningAlgorithm
public int getMaxEmissionCandidates()
public SequencePredictionFunction getPredictionFunction()
LearningAlgorithm
getPredictionFunction
in interface LearningAlgorithm
public 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)
LearningAlgorithm
dataset
learn
in interface LearningAlgorithm
dataset
- the training datapublic void reset()
LearningAlgorithm
reset
in interface LearningAlgorithm
public 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 getPredictionFunction
public void setLabels(List<Label> labels)
LearningAlgorithm
setLabels
in interface LearningAlgorithm
labels
- 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 getPredictionFunction
public 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.