public class SequencePredictionFunction extends Object implements PredictionFunction
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BEAM_SIZE |
static int |
DEFAULT_MAX_EMISSION_CAND |
Constructor and Description |
---|
SequencePredictionFunction() |
SequencePredictionFunction(SequenceModel model) |
Modifier and Type | Method and Description |
---|---|
int |
getBeamSize() |
List<Label> |
getLabels()
Returns the labels representing the concept to be predicted.
|
int |
getMaxEmissionCandidates() |
SequenceModel |
getModel()
Returns the model
|
SequencePrediction |
predict(Example example) |
void |
reset()
Resets all the predictor parameters to the default state.
|
void |
setBeamSize(int beamSize) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be predicted.
|
void |
setMaxEmissionCandidates(int maxEmissionCandidates) |
void |
setModel(Model model)
Sets the model
|
public static final int DEFAULT_MAX_EMISSION_CAND
public static final int DEFAULT_BEAM_SIZE
public SequencePredictionFunction()
public SequencePredictionFunction(SequenceModel model)
model
- The model produced by a
SequenceClassificationLearningAlgorithm
public int getBeamSize()
public List<Label> getLabels()
PredictionFunction
getLabels
in interface PredictionFunction
public int getMaxEmissionCandidates()
public SequenceModel getModel()
PredictionFunction
getModel
in interface PredictionFunction
public SequencePrediction predict(Example example)
predict
in interface PredictionFunction
public void reset()
PredictionFunction
reset
in interface PredictionFunction
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.public void setLabels(List<Label> labels)
PredictionFunction
setLabels
in interface PredictionFunction
labels
- the labels representing the concept to be predictedpublic 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.public void setModel(Model model)
PredictionFunction
setModel
in interface PredictionFunction
model
- the model to setCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.