Chapter 6. Command-Line Interface

Table of Contents

6.1. In a nutshell
6.2. CLI Options
6.2.1. Observation distributions
6.2.2. create
6.2.3. print
6.2.4. learn-kmeans
6.2.5. learn-bw
6.2.6. generate
6.2.7. distance-kl
6.3. Example

6.1. In a nutshell

A command-line interface (CLI) makes it possible to use most of the library's algorithms without writing any line of code.

In a nutshell, it means that one can create a 5 states Hidden Markov Model that deals with integer observations by simply typing:

jahmm-cli create -opdf integer -r 10 -n 5 -o test.hmm

This creates a file test.hmm containing the description of a HMM with 5 states (-n argument). Each state is associated with a distribution over integer 0...9 (10 different values, -r argument).

The line above launches a program called jamm-cli, which is supposed to be the command-line program of the Jahmm library. The exact way to launch a Java program is plateform-dependant, but generally amounts to type

java be.ac.ulg.montefiore.run.jahmm.apps.cli.Cli

Typing this is quite inconvenient, but can generally be simplified. Under Unix, bash users could add a line such as

alias jahmm-cli='java be.ac.ulg.montefiore.run.jahmm.apps.cli.Cli'

to their .bashrc file. Launching the CLI is then as easy as typing jahmm-cli.