|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FeatureList
used to pass feature evaluations from a FeatureManager to the Conrad engine during an evaluate call.
A FeatureList is always the last argument passed to an evaluate call on FeatureManager.
It allows the feature to add in evaluations or declare the given node or edge invalid. This interface is present so that
new memory does not have to be allocated during the evaluation process and so that a given FeatureManager can return any
arbitrary number of feature evaluations from an evaluate call.
| Method Summary | |
|---|---|
void |
addFeature(int index,
double value)
returns a feature value for this evaluation. |
void |
invalidate()
specifies that node, edge, or segment specified in the evaluate call is invalid. |
boolean |
isValid()
checks if the current node, edge, or segment is valid. |
| Method Detail |
|---|
void addFeature(int index,
double value)
FeatureManager can provide evaluations for more than one
feature, it is necessary to identify the specific feature by passing its index.
If an evaluate call is made and addFeature is not called for a given feature index, then the value for
that feature is assumed to be zero. This makes it very efficient to evaluate sparse features.
The value can be any real number, and passing zero is allowed but unnecessary.
index - the index of the feature which has been evaluatedvalue - the value of the feature.void invalidate()
evaluate call is invalid. When invalid nodes or edges are found
the engine will exclude all hidden state paths including that node, edge, or segment from both training and inference. This is very
different from returning zero for a given feature. Note that if even one FeatureManager invalidates a node or edge, then
no feature evaluations at that position will be used. This is very different from returning zero, which simply means that the path is
valid, but the feature doesn't provide any information.
boolean isValid()
evaluate function there is no point in adding any new feature values.
FeatureList is still valid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||