public class SequenceClassificationKernelBasedLearningAlgorithm extends SequenceClassificationLearningAlgorithm implements KernelMethod
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 |
---|
SequenceClassificationKernelBasedLearningAlgorithm() |
SequenceClassificationKernelBasedLearningAlgorithm(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
|
Kernel |
getKernel()
Returns the kernel exploited by this learner
|
void |
setBaseAlgorithm(LearningAlgorithm baseAlgorithm) |
void |
setKernel(Kernel kernel)
Sets the kernel this
|
void |
setKernelCache(KernelCache cache) |
getBaseLearningAlgorithm, getBeamSize, getLabels, getMaxEmissionCandidates, getPredictionFunction, getSequenceExampleGenerator, getTransitionsOrder, learn, reset, setBaseLearningAlgorithm, setBeamSize, setLabels, setMaxEmissionCandidates, setSequenceExampleGenerator
public SequenceClassificationKernelBasedLearningAlgorithm()
public SequenceClassificationKernelBasedLearningAlgorithm(BinaryLearningAlgorithm baseLearningAlgorithm, int transitionsOrder, float transitionWeight) throws Exception
baseLearningAlgorithm
- the 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
kernel-based methodpublic LearningAlgorithm duplicate()
LearningAlgorithm
duplicate
in interface LearningAlgorithm
public LearningAlgorithm getBaseAlgorithm()
MetaLearningAlgorithm
getBaseAlgorithm
in interface MetaLearningAlgorithm
public Kernel getKernel()
KernelMethod
getKernel
in interface KernelMethod
public void setBaseAlgorithm(LearningAlgorithm baseAlgorithm)
setBaseAlgorithm
in interface MetaLearningAlgorithm
baseAlgorithm
- the baseAlgorithm to setpublic void setKernel(Kernel kernel)
KernelMethod
setKernel
in interface KernelMethod
kernel
- the kernel to setpublic void setKernelCache(KernelCache cache)
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.