40 #ifndef _HMMLIKELIHOOD_H_ 41 #define _HMMLIKELIHOOD_H_ 45 #include "../Function/Functions.h" 46 #include "../VectorTools.h" 82 #ifndef NO_VIRTUAL_COV 123 virtual void setBreakPoints(
const std::vector<size_t>& breakPoints) = 0;
197 throw (
NotImplementedException(
"AbstractHmmLikelihood::getSecondOrderDerivative is not defined for 2 variables."));
211 #endif //_HMMLIKELIHOOD_H_
virtual const std::vector< size_t > & getBreakPoints() const =0
virtual double getLogLikelihood() const =0
double getDLogLikelihood() const
virtual void getHiddenStatesPosteriorProbabilities(std::vector< std::vector< double > > &probs, bool append) const =0
This class allows to perform a correspondence analysis.
virtual const HmmEmissionProbabilities & getHmmEmissionProbabilities() const =0
virtual double getDLogLikelihood() const =0
Interface for computing emission probabilities in a Hidden Markov Model.
void enableSecondOrderDerivatives(bool yn)
Tell if derivatives must be computed.
void enableFirstOrderDerivatives(bool yn)
Tell if derivatives must be computed.
virtual void computeDLikelihood_() const =0
virtual void setBreakPoints(const std::vector< size_t > &breakPoints)=0
double getD2LogLikelihood() const
This expeption is sent when a given method is not implemented.
bool enableFirstOrderDerivatives() const
Tell if derivatives must be computed.
double getSecondOrderDerivative(const std::string &variable) const
Get the second order derivative of the function at the current point.
virtual HmmLikelihood * clone() const =0
Create a copy of this object and send a pointer to it.
virtual double getD2LogLikelihood() const =0
std::vector< double > Vdouble
virtual double getLikelihoodForASite(size_t site) const =0
Get the likelihood for a site.
double getFirstOrderDerivative(const std::string &variable) const
Get the derivative of the function at the current point.
This is the abstract class for second order derivable functions.
AbstractHmmLikelihood & operator=(const AbstractHmmLikelihood &adhlik)
double getSecondOrderDerivative(const std::string &variable1, const std::string &variable2) const
Get the value of the cross derivative of the function according to a given set of parameters...
virtual const HmmTransitionMatrix & getHmmTransitionMatrix() const =0
virtual Vdouble getLikelihoodForEachSite() const =0
Get the likelihood for each site.
virtual const HmmStateAlphabet & getHmmStateAlphabet() const =0
virtual Vdouble getHiddenStatesPosteriorProbabilitiesForASite(size_t site) const =0
virtual void computeD2Likelihood_() const =0
bool enableSecondOrderDerivatives() const
Tell if derivatives must be computed.
Describe the transition probabilities between hidden states of a Hidden Markov Model.
Basal interface for Hidden Markov Models likelihood computation.