It would be useful to have functions and subcommands which simply return or print the number of states or observations in a model. These will be useful when doing statistics on models which selected the number of states automatically.
Subcommands could be implemented as hmm count X, where X is either states or observations. The model is read from stdin.
The functions themselves are trivial, and almost needn't be abstracted:
(defn count-states [model]
(-> model :states count))
(defn count-observations [model]
(-> model :observations count))
It would be useful to have functions and subcommands which simply return or print the number of states or observations in a model. These will be useful when doing statistics on models which selected the number of states automatically.
Subcommands could be implemented as
hmm count X
, whereX
is eitherstates
orobservations
. The model is read fromstdin
.The functions themselves are trivial, and almost needn't be abstracted: