dwysocki / hidden-markov-music

Generate original musical scores by means of a hidden Markov model.
MIT License
6 stars 1 forks source link

Subcommands and functions for simple counting #4

Closed dwysocki closed 9 years ago

dwysocki commented 9 years ago

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))
dwysocki commented 9 years ago

Features implemented in #8