|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.classify.sequential.BeamSearcher
public class BeamSearcher
A conditional markov model classifier.
| Field Summary |
|---|
| Fields inherited from interface edu.cmu.minorthird.classify.sequential.SequenceConstants |
|---|
HISTORY_FEATURE, NULL_CLASS_NAME |
| Constructor Summary | |
|---|---|
BeamSearcher(Classifier classifier,
int historySize,
ExampleSchema schema)
|
|
| Method Summary | |
|---|---|
ClassLabel[] |
bestLabelSequence(Instance[] instances)
Get the best label sequence, as determined by the beam search |
void |
doSearch(Instance[] sequence)
Do a beam search. |
void |
doSearch(Instance[] sequence,
ClassLabel[] template)
Do a beam search, constraining the bestLabel for each classification to match the non-null values in the template. |
java.lang.String |
explain(Instance[] sequence)
|
static Instance |
getBeamInstance(Instance instance,
int historySize)
|
Explanation |
getExplanation(Instance[] sequence)
|
int |
getMaxBeamSize()
|
int |
getNumberOfSolutionsFound()
Return the number of solutions found in the beam. |
float |
score(int k)
|
void |
setMaxBeamSize(int n)
|
ClassLabel[] |
viterbi(int k)
Retrieve the k-th best result of the previous beam search. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeamSearcher(Classifier classifier,
int historySize,
ExampleSchema schema)
| Method Detail |
|---|
public int getMaxBeamSize()
public void setMaxBeamSize(int n)
public ClassLabel[] bestLabelSequence(Instance[] instances)
public static Instance getBeamInstance(Instance instance,
int historySize)
public void doSearch(Instance[] sequence)
public void doSearch(Instance[] sequence,
ClassLabel[] template)
This would be better folded in with the one-arg version of doSearch, but is kept separate for backward compatibility.
public int getNumberOfSolutionsFound()
public ClassLabel[] viterbi(int k)
public float score(int k)
public java.lang.String explain(Instance[] sequence)
public Explanation getExplanation(Instance[] sequence)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||