Change Log {HiddenMarkov} | R Documentation |
Changes Made to Package HiddenMarkov
Description
This page contains a listing of recent changes made to the package.
Details
Since we have included different classes of HMMs (see
dthmm
,mmglm0
andmmpp
), it is much tidier to use an object orientated approach. This ensures that the functions across all models follow a more consistent naming convention, and also the argument list for the different model functions are more simple and consistent (seeHiddenMarkov
). (14 Sep 2007)The main tasks (model fitting, residuals, simulation, Viterbi, etc) can now be called by generic functions (see topic
HiddenMarkov
). The package documentation has been rearranged so that these generic functions contain the documentation for all model types (e.g. seeBaumWelch
). (14 Sep 2007)There are a number of functions, still contained in the package, that are obsolete. This is either because they do not easily fit into the current naming convention used to implement the more object orientated approach, or their argument list is slightly complicated. These functions have been grouped in the topics
dthmm.obsolete
andmmpp.obsolete
. (14 Sep 2007)There are various second level functions. For example, the model fitting is achieved by the generic
BaumWelch
function. However, this will call functions to do the E-step, M-step, forward and backward probabilities, and so on. At the moment, these second level functions have not been modified into an object orientated approach. It is not clear at this point whether this would be advantageous. If one went down this route, then one would probably group all of the E-step functions (for all models) under the same topic. If not, then it may be best to group all second level functions for each model under the same topic (e.g.forwardback
,probhmm
andEstep
would be grouped together, being the second level functions for thedthmm
model). (14 Sep 2007)The original function called
Viterbi
has been renamed toViterbihmm
, andViterbi
is now a generic function. (14 Sep 2007)Programming code that uses old versions of the functions should still work with this revised version of the package. However, you will get warning messages stating that certain functions are deprecated, and suggesting a possible alternative. To get a quick overview of the programming style, have a look at the examples in topic
dthmm
. (09 Nov 2007)-
forwardback
:for
loops replaced by Fortran code; much faster. The corresponding R code is still contained within the function in case the Fortran has incompatibility issues. (23 Nov 2007) -
forwardback.mmpp
:for
loops replaced by Fortran code. The corresponding R code is still contained within the function in case the Fortran has incompatibility issues. (24 Nov 2007) -
Estep.mmpp
:for
loops replaced by Fortran code. Cuts time considerably. These loops in R used far more time than the forward and backward equations. The corresponding R code is still contained within the function in case the Fortran has incompatibility issues. (27 Nov 2007) -
forwardback.mmpp
,forwardback
andEstep.mmpp
: argumentfortran
added. (3 Dec 2007) -
forwardback
,forwardback.mmpp
andEstep.mmpp
: inclusion of all variable sized arrays in the Fortran subroutine call to be compatible with non gfortran compilers (3 Dec 2007); more added for calls to Fortran subroutinesmulti1
andmulti2
. (6 Dec 2007) -
Estep.mmpp
: error in Fortran code of loop 6;j1=0
toj1=1
. (5 Dec 2007) -
BaumWelch.mmpp
:if (diff < 0) stop ...
toif (diff < 0 & control$posdiff) stop ...
, consistent withBaumWelch.dthmm
. (11 Dec 2007) -
logLik.dthmm
,logLik.mmglm0
,logLik.mmpp
:for
loop replaced by Fortran code. (15 Feb 2008) -
dthmm
: argumentdiscrete
set automatically for known distributions, stops if not set for unknown distributions. (15 Feb 2008) -
neglogLik
,Pi2vector
,vector2Pi
,Q2vector
,vector2Q
: new functions providing an alternative means of calculating maximum likelihood parameter estimates. (18 Feb 2008) -
dthmm
: argumentnonstat
was not set correctly. (21 Jun 2008) Hyperlinks on package vignettes page. (22 Jun 2008)
-
mmpp
: argumentnonstat
was not set correctly. (23 Jun 2008) The manual pages
HiddenMarkov-dthmm-deprecated
andHiddenMarkov-mmpp-deprecated
have been given a keyword of “internal”. This hides them from the listing of package functions. (3 Jul 2008)All cited references are now only listed in the topic
HiddenMarkov
. (3 Jul 2008)-
neglogLik
: argumentupdatep
has been renamed topmap
. (9 Jul 2008) -
neglogLik
: format of this function changed to be consistent with that in package PtProcess. Argumentp
renamed asparams
. (07 Aug 2008) -
mmglm0
: remove some LaTeX specific formatting to be compatible with R 2.9.0. (26 Jan 2009) -
Viterbi
: Correct hyperlink to base functionwhich.max
. (10 Oct 2009) Tidied HTML representation of equations in manual pages. (15 Dec 2009)
-
mmglm
: Renamed tommglm0
, new versionmmglm1
. See manual page for more details. (5 Jan 2010) -
mmglmlong1
: new function for longitudinal data. (18 Jan 2010) -
dthmm
: clarify argumentdistn
on manual page, and nature of parameter estimates when the Markov chain is stationary. (04 Feb 2010) -
BaumWelch.mmglmlong1
: new argumenttmpfile
added. (13 Feb 2010) -
Viterbi
: Methods added for objects of class"mmglm1"
and"mmglmlong1"
. (29 Jul 2010) -
logLik
: Method added for object of class"mmglmlong1"
. (30 Jul 2010) -
forwardback.dthmm
,forwardback.mmpp
: New argument"fwd.only"
. (30 Jul 2010) -
logLik.dthmm
: Callsforwardback.dthmm
to perform calculations. (30 Jul 2010) -
logLik.mmpp
: Callsforwardback.mmpp
to perform calculations. (30 Jul 2010) -
Viterbi
: Now generates an error message when applied to objects of class"mmpp"
. Method not currently available. (03 Aug 2010) -
"Viterbi.mmglm1"
: Fixed bug with number of Bernoulli trials specification when using a binomial family. (05 Aug 2010) -
residuals.dthmm
,probhmm
: Modify for greater efficiency and generality to accommodate more general models. Arguments ofprobhmm
have also been changed. (05 Aug 2010) -
residualshmm
: Made defunct, incompatible with revisedprobhmm
. (05 Aug 2010) -
residuals
: Methods added for objects of class"mmglm1"
and"mmglmlong1"
. Generates an error message when applied to objects of class"mmpp"
, currently no method available. (05 Aug 2010) Add CITATION file. (24 Sep 2010)
-
makedistn
: Changeeval(parse(text=paste(x, " list(log=log)))", sep="")))
to
eval(parse(text=paste(x, " list(log.p=log)))", sep="")))
. (19 Dec 2010) -
pglm
,pmmglm
: Change alllog
arguments tolog.p
. (19 Dec 2010) Revise examples in
/tests
directory. (02 May 2011)Implement very basic NAMESPACE and remove file
/R/zzz.R
. (5 Nov 2011)List functions explicitly in NAMESPACE. (19 Dec 2011)
-
mmglm
andneglogLik
: Restrict the number of iterations in examples on manual pages to minimise time during package checks. (19 Dec 2011) -
modify.func
: New function to allow the user to modify package functions in the NAMESPACE set-up. This function violates the CRAN policy as users are not supposed to change the NAMESPACE on such packages. Some examples where it is required to modify package functions will not work, for example, the second example inMstep
. (7 Mar 2012) -
modify.func
: Function removed. See the second example inMstep
for a work-around when package functions need to be modified. (14 Apr 2012) -
Mstep
: Revised documentation about distribution requirements and ways to include other distributions into the software framework. (14 Apr 2012) The package snow has been superseded by parallel, changed where needed. In
BaumWelch.mmglmlong1
argumentsmakeSOCKcluster
andSNOWcluster
renamed tomakePSOCKcluster
andPSOCKcluster
, respectively. Functionsdmmglm
andpmmglm
added to exported namespace (required for parallel processing). (13 Aug 2014)-
BaumWelch.mmglmlong1
: Call toclusterApply
andclusterExport
changed toparallel::clusterApply
andparallel::clusterExport
, respectively. (25 Sep 2014) Fix error in
inst/CITATION
file. (21 Jan 2015)Added to NAMESPACE: functions imported from stats. (06 Jul 2015)
-
HiddenMarkov
: Add DOI to some references, rename topic to appear first in table of contents. (16 Oct 2015) Fortran warning: in file
src/extract.f
,integer
definitions should precededouble precision
definitions. (29 Aug 2016)Fix NOTES in
R CMD check --as-cran
:Found no calls to: 'R_registerRoutines',
'R_useDynamicSymbols'
(17 Jun 2017)-
simulate.mchain
: Changeif (sum(object$delta)!=1)
toif (!isTRUE(all.equal(sum(object$delta), 1)))
. (21 Oct 2017) -
simulate.mmpp
: Changeif (sum(object$delta)!=1)
toif (!isTRUE(all.equal(sum(object$delta), 1)))
. (27 Oct 2017) Clarify various points in documentation. (27 Oct 2017)
-
HiddenMarkov
: Hyperlink update to Harte (2019); others updated to https where possible. (27 Apr 2021)
Future Development
The functions
Viterbi
andresiduals
need methods for objects of classmmpp
.A number of the original functions have names that are too general. For example
forwardback
calculates the forward-backward probabilities, but only for the modeldthmm
. The corresponding function for themmpp
model isforwardback.mmpp
. It would be more consistent to attach to these original functions adthmm
suffix.The demonstration examples are all for
dthmm
. Also need some formmglm1
,mmglmlong1
andmmpp
.