[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:00761] Re: HGenS and WUW matrix


Hi,

According to the comments from Toda-san,
the C is not a matrix but a vector.

Thanks,
Junichi


On 2007/08/02, at 10:55, Alexander Gutkin wrote:

Hi,

On 8/1/07, Tomoki Toda <tomoki@xxxxxxxxxxx> wrote:
Hi,

  I have a question regarding HTS internals (either HGenS or mlpg
code in hts_engine). From what I am seeing the W^{T}U^{-1}W matrix is stored as TxWidth, while the parameter matrix C is TxD, where D is the
order. For my modifications, in some instances (e.g. GV) I need to
somehow compute the W^{T}U^{-1}WC product, but that's not
straightforward as the matrix dimensions mismatch.

Note that the actual size of the W^{T}U^{-1}W matrix is TD-by-TD.
It is a (4LD+1)-diagonal band symmetric matrix. Therefore, we need
to store only TD-by-(2LD+1) elements for it. The size of the C "vector"
is TD-by-1.


    Is there a typo in your calculation above? I get the following:

    1. W is TD-by-((2L+1)TD), U is ((2L+1)TD)-by-((2L+1)TD). This
indeed results in a "WUW" of TD-by-TD,
2. M is a ((2L+1)TD)-by-1 ``vector'', resulting in "WUM" of TD- by-1.

But in case of diagonal covariances the bandwidth of "WUW" would be
(2L + 1)D, wouldn't it? In this case your data structures indeed make
sense, but that still leaves my question unanswered as the pseudo-code
snippet in my original message does not produce the expected results
and I suspect that the W^{T}U^{-1}WC product is calculated in a wrong
fashion:

    B = W^{T}U^{-1]M - W^{T}U^{-1}WC

    //
    // for a given dimension d \in [1 ; D]
    //
    for (t = 1; t <= pst->T; t++) {
        B[t] = 0.0;
        for (k = 1; (k <= pst->width) && (t + k <= pst->T); k++) {
            B[t] += (pst->sm.WUW[t][k] * C[t + k][d]);
        }
        B[t] = pst->sm.WUM[t] - B[t];
    }

The above can be easily tested for the initial value of the parameters
(C_0) that should yield  (for any given dimension d) a zero vector B.
The test fails, however and I suspect that I got something badly
wrong.

Sincerely,

    Alexander.

When using diagonal covariance matrices, we can calculate each of the
D-dimensions independently. Therefore, at each dimension, we need
to store only T-by-(2L+1) elements for W^{T}U^{-1}W and only
T-by-1 elements for C, where 2L+1=Width.

Sincerely,
Tomoki Toda
  Nara Institute of Science and Technology
  E-mail: tomoki@xxxxxxxxxxx
  TEL: +81-743-72-5282
  FAX: +81-743-72-5289

----- Original Message -----
From: "Alexander Gutkin" <alexander.gutkin@xxxxxxxxx>
To: <hts-users@xxxxxxxxxxxxxxx>
Sent: Wednesday, August 01, 2007 11:54 PM
Subject: [hts-users:00758] HGenS and WUW matrix


Hi,

  I have a question regarding HTS internals (either HGenS or mlpg
code in hts_engine). From what I am seeing the W^{T}U^{-1}W matrix is stored as TxWidth, while the parameter matrix C is TxD, where D is the
order. For my modifications, in some instances (e.g. GV) I need to
somehow compute the W^{T}U^{-1}WC product, but that's not
straightforward as the matrix dimensions mismatch. I've tried several
approaches to computing the product but so far without any success.
  The following code snippet from my code is a current broken
implementation of computing the following term:

   B = W^{T}U^{-1]M - W^{T}U^{-1}WC

   // for a given m
   for (t = 1; t <= pst->T; t++) {
       B[t] = 0.0;
       for (k = 1; (k <= pst->width) && (t + k <= pst->T); k++) {
           B[t] += (pst->sm.WUW[t][k] * C[t + k][m]);
       }
       B[t] = pst->sm.WUM[t] - B[t];
   }

                  Thanks in advance,
                                     Alexander.








References
[hts-users:00758] HGenS and WUW matrix, Alexander Gutkin
[hts-users:00759] Re: HGenS and WUW matrix, Tomoki Toda
[hts-users:00760] Re: HGenS and WUW matrix, Alexander Gutkin