public class SequenceClassificationLinearLearningAlgorithm extends SequenceClassificationLearningAlgorithm implements LinearMethod
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 |
---|
SequenceClassificationLinearLearningAlgorithm(BinaryLearningAlgorithm baseLearningAlgorithm,
int transitionsOrder,
float transitionWeight) |
Modifier and Type | Method and Description |
---|---|
LearningAlgorithm |
duplicate()
Creates a new instance of the LearningAlgorithm initialized with the same parameters
of the learningAlgorithm to be duplicated.
|
LearningAlgorithm |
getBaseAlgorithm()
Returns the base algorithm this meta algorithm is based on
|
String |
getRepresentation()
Returns the representation this learning algorithm exploits
|
void |
setBaseAlgorithm(LearningAlgorithm baseAlgorithm) |
void |
setRepresentation(String representationName)
Sets the representation this learning algorithm will exploit
|
getBaseLearningAlgorithm, getBeamSize, getLabels, getMaxEmissionCandidates, getPredictionFunction, getSequenceExampleGenerator, getTransitionsOrder, learn, reset, setBaseLearningAlgorithm, setBeamSize, setLabels, setMaxEmissionCandidates, setSequenceExampleGenerator
public SequenceClassificationLinearLearningAlgorithm(BinaryLearningAlgorithm baseLearningAlgorithm, int transitionsOrder, float transitionWeight) throws Exception
baseLearningAlgorithm
- the "linear" learning algorithm devoted to the acquisition of
a model after that each example has been enriched with its
"history"transitionsOrder
- given a targeted item in the sequence, this variable
determines the number of previous example considered in the
learning/labeling process.transitionWeight
- the importance of the transition-based features during the
learning process. Higher valuers will assign more importance
to the transitions.Exception
- The input baseLearningAlgorithm
is not a Linear methodpublic LearningAlgorithm duplicate()
LearningAlgorithm
duplicate
in interface LearningAlgorithm
public LearningAlgorithm getBaseAlgorithm()
MetaLearningAlgorithm
getBaseAlgorithm
in interface MetaLearningAlgorithm
public String getRepresentation()
LinearMethod
getRepresentation
in interface LinearMethod
public void setBaseAlgorithm(LearningAlgorithm baseAlgorithm)
setBaseAlgorithm
in interface MetaLearningAlgorithm
baseAlgorithm
- the baseAlgorithm to setpublic void setRepresentation(String representationName)
LinearMethod
setRepresentation
in interface LinearMethod
representationName
- the representation to setCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.