Input and Output File Format

Every file read (written) by the hmm_batch plugin must be in the following format:

$<N>$
$<M>$
$<B>$

$<pi_{(N \times 1)}>$

$<A_{(N \times N)}>$

$<obs_{(N \times (M+(M \cdot M) - 1))}>$; where $obs[i][j] = r[i][j]$, for $0 \leq j < M$;
$obs[i][M] =
p[i][0][0]$;
$obs[i][M+1] =
p[i][0][1]$;
$\cdots$
$obs[i][M+(M-1)] =
p[i][0][M-1]$;
$obs[i][M+M] =
p[i][1][0]$;
$\cdots$
$obs[i][M+(M \cdot M)
-1]
= p[i][M-1][M-1]$;

where $<$N$>$, $<$M$>$, $<$B$>$, $<$pi$>$, $<$A$>$ and $<$r$>$, $<$p$>$ are the hmm_batch attributes specified previously.

Example:

2
3
5

1.0
0.0

0.3 0.7
0.5 0.5

# r[i][j]   ## p[i][0][k]  ## p[i][1][k]  ## p[i][2][k]
0.1 0.1 0.8    0.2 0.2 0.6    0.9 0.1 0.0    0.4 0.4 0.2
0.5 0.0 0.5    0.8 0.0 0.2    0.3 0.3 0.4    0.7 0.2 0.1

Note: The load and save methods can, as previously described, load/save specific attribute descriptions. In this case, the file which is read/written by these methods should have the same format described above, but include only the specific attribute which is being loaded/saved, i.e, the other attributes should be omitted from the file.



Guilherme Dutra Gonzaga Jaime 2010-10-27