|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.io.TrainingSequence<A>
A - the elements which make up the input sequence which is part of this training sequencepublic class TrainingSequence<A>
represents an input sequence that also contains a sequence of hidden states.
| Constructor Summary | |
|---|---|
TrainingSequence(InputSequence<? extends A> xArg)
constructs a training sequence using just the input sequence. |
|
TrainingSequence(InputSequence<? extends A> xArg,
int[] yArg)
constructs a training sequence using these input and hidden sequences |
|
| Method Summary | |
|---|---|
InputSequence<?> |
getComponent(java.lang.String name)
For input sequences that are a composite of several different input objects, returns a particular component of the input. |
InputSequence<? extends A> |
getInputSequence()
gets the underlying input sequence |
TrainingSequence |
getTrainingComponent(java.lang.String name)
returns a new TrainingSequence created by taking a single component of the input sequence and pairing it with the hidden states for this Training Sequence. |
A |
getX(int ix)
gets the value of the underlying input sequence at a particular position |
int[] |
getY()
gets the vector of hidden state indices |
int |
getY(int x1)
gets the hidden state index at a particular position |
int |
length()
gets the length of the input and training sequences |
java.util.Collection<java.lang.String> |
listComponents()
For input sequences that are a composite of several different input objects, returns a list of the names of the components in this input sequence. |
void |
setY(int[] hiddenStates)
sets the vector of hidden state indices. |
void |
setY(int x,
int z)
sets the hidden state index at a particular position |
TrainingSequence<A> |
subSequence(int start,
int end)
tTakes a subinterval of the input sequence with given start-end coordinates which are relative coordinates, 1-based, and inclusive. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TrainingSequence(InputSequence<? extends A> xArg)
xArg - the input sequence the hidden states correspond to
public TrainingSequence(InputSequence<? extends A> xArg,
int[] yArg)
xArg - the input sequence the hidden states correspond toyArg - the state indices of the values of the hidden states| Method Detail |
|---|
public InputSequence<? extends A> getInputSequence()
public int[] getY()
public void setY(int[] hiddenStates)
hiddenStates - an array of ints containing the index of the hidden state at each position in the sequencepublic int getY(int x1)
x1 - the 0-based position at which to get the hidden state index
public void setY(int x,
int z)
x - the 0-based position at which to get the hidden state indexz - the vlaue of the hidden state index to set for this positionpublic A getX(int ix)
getX in interface InputSequence<A>ix - a zero-based index into the input sequence
public int length()
length in interface InputSequence<A>public InputSequence<?> getComponent(java.lang.String name)
InputSequenceUnsupportedOperationException.
getComponent in interface InputSequence<A>name - the name of the input component to return
public java.util.Collection<java.lang.String> listComponents()
InputSequence
listComponents in interface InputSequence<A>public TrainingSequence getTrainingComponent(java.lang.String name)
name - the name of the component to extract from the composite input sequence
public TrainingSequence<A> subSequence(int start,
int end)
InputSequence
An implementation that does not support subsetting should throw an UnsupportedOperationException
subSequence in interface InputSequence<A>start - the 1-based index of the first position of the input to retrieve.end - the 1-based index of the last position of the input to retrieve.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||