[hts-users:01761] Re: bug fix in HGen.c for random parameter generation
Thank you very much for reporting it. You are right.
We will reflect this in the future release.
Thanks,
Keiichi Tokuda
From: Matt Shannon <sms46@xxxxxxxxx>
Subject: [hts-users:01757] bug fix in HGen.c for random parameter generation
Date: Mon, 03 Nov 2008 14:29:40 +0000
Message-ID: <490F0AD4.6090400@xxxxxxxxx>
> There's a bug in the random parameter generation part of
> Forward_Substitution in HGen.c. When using random parameter generation
> (flag 'p'), it causes very distorted output, with a few large artefacts
> every second.
>
> The fix is to take the code which adds GaussDeviate to g[t] outside the
> loop which generates g[t]. Previously there was a feedback effect,
> where random values of g[t] for small t were influencing the mean value
> for g[t] for larger t, which mathematically shouldn't happen.
>
> Manual patch-like diff follows:
>
> /* forward substitution */
> for (t=1; t<=T; t++) {
> g[t] = r[t];
> for (i=1; (i<width) && (t-i>0); i++)
> g[t] -= U[t-i][i+1] * g[t-i];
> g[t] /= U[t][1];
> -
> - /* random generation */
> - if (rFlags&RNDPAR)
> - g[t] += GaussDeviate(rndParMean, rndParVar);
> }
> +
> + if (rFlags&RNDPAR) {
> + /* random generation */
> + for (t=1; t<=T; t++) {
> + g[t] += GaussDeviate(rndParMean, rndParVar);
> + }
> + }
>
> Matt Shannon
- References
-
- [hts-users:01757] bug fix in HGen.c for random parameter generation, Matt Shannon