StochHMM
v0.34
Flexible Hidden Markov Model C++ Library and Application
|
Transition information for each state. More...
#include <transitions.h>
Private Member Functions | |
bool | _parseStandard (std::string &, stringList &, valueType) |
bool | _parseDuration (stringList &, stringList &, valueType) |
bool | _parseLexical (stringList &, stringList &, valueType, tracks &, StateFuncs *) |
bool | _processTags (std::string &, tracks &, weights *, StateFuncs *) |
Private Attributes | |
transType | transition_type |
std::string | stateName |
state * | toState |
double | log_trans |
std::vector< double > * | distribution |
double | extendedValue |
Transition Length Distribution. | |
tracebackIdentifier | traceback_identifier |
std::string | traceback_string |
bool | function |
emissionFuncParam * | lexFunc |
lexicalTable | scoreTable |
transitionFuncParam * | func |
Friends | |
class | model |
class | state |
StochHMM::transition::transition | ( | ) |
StochHMM::transition::transition | ( | transType | type | ) |
Create a transition of a certain type
type | enum transType (STANDARD, DURATION, LEXICAL) |
Definition at line 32 of file transitions.cpp.
References StochHMM::DIFF_STATE, extendedValue, func, lexFunc, log_trans, toState, traceback_identifier, and transition_type.
Create a transition of a certain type
type | Type of transType |
valType | Type of Value Transition uses |
Is | distributions defined as survival |
Definition at line 48 of file transitions.cpp.
References StochHMM::DIFF_STATE, func, lexFunc, log_trans, toState, traceback_identifier, and transition_type.
|
private |
Definition at line 198 of file transitions.cpp.
References StochHMM::stringList::contains(), StochHMM::DIFF_STATE, distribution, extendedValue, StochHMM::stringList::indexOf(), StochHMM::PROBABILITY, StochHMM::stringList::size(), StochHMM::stringList::splitString(), StochHMM::START_INIT, StochHMM::STATE_GFF, StochHMM::STATE_LABEL, StochHMM::STATE_NAME, stateName, StochHMM::stringList::stringify(), StochHMM::stringToDouble(), StochHMM::stringToInt(), traceback_identifier, and traceback_string.
Referenced by parse().
|
private |
Definition at line 286 of file transitions.cpp.
References StochHMM::lexicalTable::addTrack(), StochHMM::AVERAGE_SCORE, StochHMM::stringList::contains(), StochHMM::COUNTS, StochHMM::DEFINED_SCORE, StochHMM::expVector(), StochHMM::lexicalTable::getAlphaSize(), StochHMM::lexicalTable::getCountsTable(), StochHMM::lexicalTable::getLogProbabilityTable(), StochHMM::lexicalTable::getNumberOfAlphabets(), StochHMM::lexicalTable::getOrder(), StochHMM::lexicalTable::getProbabilityTable(), StochHMM::tracks::getTrack(), StochHMM::HIGHEST_SCORE, StochHMM::stringList::indexOf(), lexFunc, StochHMM::LOG_PROB, StochHMM::logVector(), StochHMM::LOWEST_SCORE, StochHMM::stringList::pop_ith(), StochHMM::POWER, StochHMM::PROBABILITY, StochHMM::probVector(), StochHMM::stringList::push_back(), scoreTable, StochHMM::lexicalTable::setUnkScore(), StochHMM::lexicalTable::setUnkScoreType(), StochHMM::stringList::size(), StochHMM::stringList::splitString(), stateName, StochHMM::stringList::stringify(), StochHMM::stringToDouble(), StochHMM::stringToInt(), and StochHMM::stringList::toVecDouble().
Referenced by parse().
|
private |
Definition at line 149 of file transitions.cpp.
References StochHMM::stringList::contains(), StochHMM::LOG_PROB, log_trans, StochHMM::PROBABILITY, StochHMM::stringList::size(), StochHMM::stringList::splitString(), stateName, and StochHMM::stringToDouble().
Referenced by parse().
|
private |
Definition at line 121 of file transitions.cpp.
References StochHMM::extractTag(), func, StochHMM::transitionFuncParam::getTrackName(), StochHMM::transitionFuncParam::parse(), and StochHMM::stringList::size().
Referenced by parse().
|
inline |
Definition at line 158 of file transitions.h.
References func.
Referenced by StochHMM::trellis::getTransition().
double StochHMM::transition::get_reduced_order | ( | int | , |
sequences * | |||
) |
|
inline |
Get pointer to externalFuncs
Definition at line 157 of file transitions.h.
References func.
Referenced by StochHMM::trellis::getTransition().
|
inline |
Definition at line 161 of file transitions.h.
References StochHMM::emissionFuncParam::getName(), and lexFunc.
|
inline |
Get the name of state that transition is to
Definition at line 129 of file transitions.h.
References stateName.
Referenced by StochHMM::state::_finalizeTransitions(), and StochHMM::state::_parseTransition().
|
inline |
Get pointer to stte that transition is to
Definition at line 133 of file transitions.h.
References toState.
|
inline |
Get the tracebackIdentifier defined in the transitioin
Definition at line 145 of file transitions.h.
References traceback_identifier.
Referenced by StochHMM::trellis::get_explicit_duration_length().
|
inline |
Get the string (GFF/Label/State Name) Traceback is to
Definition at line 149 of file transitions.h.
References traceback_string.
Referenced by StochHMM::trellis::get_explicit_duration_length().
double StochHMM::transition::getTransition | ( | size_t | pos, |
sequences * | seqs | ||
) |
Calculate the transition probability for a transition at a particular position in the sequence
pos | Position in sequences that we are determining the transition |
seqs | Pointer to sequences, used in determining transition |
Definition at line 601 of file transitions.cpp.
References distribution, StochHMM::DURATION, StochHMM::emissionFuncParam::evaluate(), extendedValue, StochHMM::lexicalTable::getValue(), lexFunc, StochHMM::LEXICAL, log_trans, scoreTable, StochHMM::STANDARD, and transition_type.
Referenced by StochHMM::trellis::getTransition().
double StochHMM::transition::getTransition | ( | ) |
|
inline |
Get the transition type
Definition at line 140 of file transitions.h.
References transition_type.
Referenced by StochHMM::trellis::getTransition().
|
inline |
|
inline |
Definition at line 163 of file transitions.h.
References StochHMM::DURATION, func, and transition_type.
Referenced by isComplex().
|
inline |
Definition at line 160 of file transitions.h.
bool StochHMM::transition::parse | ( | std::string & | txt, |
stringList & | names, | ||
valueType | valtyp, | ||
tracks & | trks, | ||
weights * | wts, | ||
StateFuncs * | funcs | ||
) |
Parse the transition User and Standard Transition from String to create a transition for the state
txt | String representation of the transition |
names | StringList of all the states |
valtyp | Value type used (log, p(x)...) |
trks | Tracks of the model |
wts | Weight defined in the model |
funcs | State Functions created by the user |
Definition at line 67 of file transitions.cpp.
References _parseStandard(), _processTags(), StochHMM::STANDARD, and transition_type.
Referenced by StochHMM::state::_parseTransition().
bool StochHMM::transition::parse | ( | stringList & | txt, |
stringList & | names, | ||
valueType | valtyp, | ||
tracks & | trks, | ||
weights * | wts, | ||
StateFuncs * | funcs | ||
) |
Parse the Transition Lexical and User from String List
txt | String representation of the transition used to create the transition from model file |
names | StringList of all the states |
valtyp | Value type used (log, p(x)...) |
trks | Tracks of the model |
wts | Weight defined in the model |
funcs | State Functions created by the user |
Definition at line 90 of file transitions.cpp.
References _parseDuration(), _parseLexical(), _processTags(), StochHMM::DURATION, StochHMM::LEXICAL, and transition_type.
void StochHMM::transition::print | ( | ) |
Print the transition to stdout.
Definition at line 515 of file transitions.cpp.
References stringify().
|
inline |
Set the length distribution of the transition Each position in the vector is a length 0=1, 99=100 length Distribution should be a survival function but could be user defined
dst | std::vector of double |
Definition at line 98 of file transitions.h.
References distribution.
|
inline |
Set the name of the state we are transitioning to
txt | Name of the next state |
Definition at line 72 of file transitions.h.
References stateName.
|
inline |
Set the pointer to the state we are transitioning to
st | Pointer to state |
Definition at line 76 of file transitions.h.
References toState.
|
inline |
Sets teh Traceback Identifier used when doing a traceback during calculation of transition
tbIdt | enum tracebackIdentifier |
Definition at line 87 of file transitions.h.
References traceback_identifier.
|
inline |
Set the traceback Label/GFF/StateName to use during traceback
txt | String to use for traceback |
Definition at line 91 of file transitions.h.
References traceback_string.
|
inline |
Set the standard transition probability of the transition
value | log based 2 value of transitioin probabability |
Definition at line 103 of file transitions.h.
References log_trans.
|
inline |
Set the type of the transition (enum transType)
type | enum Transtype |
Definition at line 81 of file transitions.h.
References transition_type.
std::string StochHMM::transition::stringify | ( | ) |
Convert the transition to a string representation as shown in the model file
Definition at line 521 of file transitions.cpp.
References StochHMM::AVERAGE_SCORE, distribution, StochHMM::double_to_string(), StochHMM::DURATION, func, StochHMM::lexicalTable::getAmbDefinedScore(), StochHMM::lexicalTable::getAmbScoringType(), StochHMM::track::getName(), StochHMM::lexicalTable::getOrder(), StochHMM::lexicalTable::getTrack(), StochHMM::emissionFuncParam::getTrackName(), StochHMM::HIGHEST_SCORE, StochHMM::int_to_string(), lexFunc, StochHMM::LEXICAL, log_trans, StochHMM::LOWEST_SCORE, StochHMM::NO_SCORE, scoreTable, StochHMM::STANDARD, StochHMM::STATE_GFF, StochHMM::STATE_LABEL, StochHMM::STATE_NAME, stateName, StochHMM::lexicalTable::stringify(), StochHMM::transitionFuncParam::stringify(), traceback_identifier, traceback_string, StochHMM::lexicalTable::trackSize(), and transition_type.
Referenced by print(), and StochHMM::state::stringify().
|
friend |
Definition at line 61 of file transitions.h.
|
friend |
Definition at line 62 of file transitions.h.
|
private |
Definition at line 188 of file transitions.h.
Referenced by _parseDuration(), getTransition(), setDistribution(), and stringify().
|
private |
Transition Length Distribution.
Definition at line 189 of file transitions.h.
Referenced by _parseDuration(), getTransition(), and transition().
|
private |
Definition at line 210 of file transitions.h.
Referenced by _processTags(), FunctionDefined(), getExtFunction(), isSimple(), stringify(), and transition().
|
private |
Definition at line 198 of file transitions.h.
|
private |
Definition at line 199 of file transitions.h.
Referenced by _parseLexical(), getLexicalFunctionName(), getTransition(), stringify(), and transition().
|
private |
Definition at line 185 of file transitions.h.
Referenced by _parseStandard(), StochHMM::state::getEndTrans(), getTransition(), setTransProb(), stringify(), and transition().
|
private |
Definition at line 201 of file transitions.h.
Referenced by _parseLexical(), getTransition(), and stringify().
|
private |
Definition at line 181 of file transitions.h.
Referenced by _parseDuration(), _parseLexical(), _parseStandard(), getName(), setName(), and stringify().
|
private |
Definition at line 182 of file transitions.h.
Referenced by getState(), setState(), and transition().
|
private |
Definition at line 191 of file transitions.h.
Referenced by _parseDuration(), getTracebackIdentifier(), setTB_Identifier(), stringify(), and transition().
|
private |
Definition at line 194 of file transitions.h.
Referenced by _parseDuration(), getTracebackString(), setTB_String(), and stringify().
|
private |
Definition at line 178 of file transitions.h.
Referenced by getTransition(), getTransitionType(), isSimple(), parse(), setTransType(), stringify(), and transition().