---
name: "mlpack_hmm_generate"
section: "1"
platform: "linux"
package: "mlpack-bin"
version: "4.6.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_hmm_generate"
---

# mlpack\_hmm\_generate(1)

hidden markov model (hmm) sequence generator

## NAME

**mlpack\_hmm\_generate** - hidden markov model (hmm) sequence generator

## SYNOPSIS

```
 mlpack_hmm_generate -l int -m unknown [-s int] [-t int] [-V bool] [-o unknown] [-S unknown] [-h -v]
```

## DESCRIPTION

This utility takes an already-trained HMM, specified as the '**--model\_file** (**-m**)' parameter, and generates a random observation sequence and hidden state sequence based on its parameters. The observation sequence may be saved with the '**--output\_file** (**-o**)' output parameter, and the internal state sequence may be saved with the '**--state\_file** (**-S**)' output parameter.

The state to start the sequence in may be specified with the '**--start\_state** (**-t**)' parameter.

For example, to generate a sequence of length 150 from the HMM 'hmm.bin' and save the observation sequence to 'observations.csv' and the hidden state sequence to 'states.csv', the following command may be used:

$ **mlpack\_hmm\_generate** **--model\_file** hmm.bin **--length** 150 **--output\_file** observations.csv **--state\_file** states.csv

## REQUIRED INPUT OPTIONS

- **--length (-l) \[*int*\]**

  Length of sequence to generate.

- **--model\_file (-m) \[*unknown*\]**

  Trained HMM to generate sequences with.

## OPTIONAL INPUT OPTIONS

- **--help (-h) \[*bool*\]**

  Default help info.

- **--info \[string\]**

  Print help on a specific option. Default value ''.

- **--seed (-s) \[*int*\]**

  Random seed. If 0, 'std::time(NULL)' is used.  Default value 0.

- **--start\_state (-t) \[*int*\]**

  Starting state of sequence. Default value 0.

- **--verbose (-v) \[*bool*\]**

  Display informational messages and the full list of parameters and timers at the end of execution.

- **--version (-V) \[*bool*\]**

  Display the version of mlpack.

## OPTIONAL OUTPUT OPTIONS

**--output\_file** (**-o**) \[*unknown*\] Matrix to save observation sequence to.

- **--state\_file (-S) \[*unknown*\]**

  Matrix to save hidden state sequence to.

## ADDITIONAL INFORMATION

For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack.
