2. TRADUCCIÒN DEL MANUAL DEL RECONOCIMIENTO Y USO DEL
2.6 Cuidado y mantenimiento
3.1.5. Grupos de los Silicatos
The Bayesian paradigm allows for an easy incorporation of further con- straints both on the parameters θ as well as on the coefficients s. This is done by specifying a prior distribution that enforces these constraints. In this section we study one possible example of such an additional con- straint; the positivity of the coefficients s. To model the sparseness and independence assumptions on swe also use the factorial mixture prior for
p(s) of the formQ
p(sn|un)p(un), where unare binary indicator variables, p(sn|un = 0) = δsn(0), i.e. a mass at zero and p(sn|un = 1) is a positive distribution which is specified below. The factorial prior used reflects the prior belief that the coefficients s are independent a priori. This assump- tion can again be relaxed if certain prior dependencies can be assumed for a problem at hand. However, the derivation of the following algorithm
CHAPTER 6. GIBBS SAMPLING APPROXIMATION 95
Figure 6.1: Histogram of MIDI note velocities (solid) versus the modified Rayleigh distribution (dashed). Also shown are an unshifted Rayleigh distribu- tion (dotted) and a shifted Rayleigh distribution (dash dotted).
then becomes slightly more involved and the computational burden might increase.
The observation noise ǫ is again assumed to be i.i.d. Gaussian. (The extension to coloured noise is possible, however, many of the computa- tional advantages of the algorithms discussed do not apply in this case.)
Positivity of the coefficients s can be enforced by restricting the prior distribution for the sn to R+. Here we propose the use of a modified
Rayleigh distribution. The use of this distribution is motivated by the application to piano music analysis that is studied in this thesis.
The physical mechanism in a piano always excites the piano strings in the same direction such that the first excursion of the observed waveform of a piano note is also always in the same direction. This means that the coefficientssalways have the same sign. As the note prototypesakand the
coefficientsscan be inverted together without changing the reconstruction we can, without loss of generality, assume s to be non-negative. Further- more, in most music performances notes are played at similar amplitudes - otherwise louder notes would overshadow quieter ones, and these would then be inaudible. These considerations lead us to propose the distribution for non-zero coefficients s described below.
This argument can be strengthened by comparing the modified Ray- leigh distribution to the histogram of note amplitudes, which is done in figure 6.1. Here we show the histogram of note amplitude as recorded from the velocity value of a MIDI keyboard, i.e. an electronic keyboard which records the velocity with which keys are pressed during a musi- cal performance. The histogram here shows the velocity values for the
notes of a performance of Ludwig van Beethoven’s Bagatelle No. 1 Opus 33. The dashed line in this figure is the graph of a modified Rayleigh distribution defined formally below. For comparison, we also show the standard Rayleigh distribution (which is also known as a square-root in- verted Gamma distribution) with the dotted line and a shifted version of this Rayleigh distribution with the dash dotted line.
It is clear that the modified Rayleigh distribution fits the estimated dis- tribution of the note activations better than the other two distributions. For other data such as biomedical time-series, other positive distributions for the non-zero coefficients might be more appropriate. For example, the modified Rayleigh distribution can be replaced by a zero mean Gaussian distribution restricted to positive values or by a uniform distribution over some positive interval. Both of these distributions can be used in the Gibbs sampler developed below. For these well known distributions the derivation of the required terms is relatively easy. We therefore concen- trate on the presentation of the derivation of the algorithm for the more complicated modified Rayleigh distribution.
The Rayleigh distribution is given as:
pR(s;σ2R) =
1
σ2
R
se−s2/2σ2R
for s > 0 and zero otherwise. This distribution is a special case of the inverted square-root gamma distribution. This distribution can be easily extended to allow for a shift parameter µand is then:
pR(s;σR2) =
1
σ2
R
(s−µ)e−(s−µ)2/2σR2
for s > µ and zero otherwise. However, this distribution is zero for all values smaller than µ. In the problem studied here this is not desired. We therefore introduce a modification of the above distribution, which we call modified Rayleigh distribution in this thesis and define as:
pmR(s;µσR2) =
1
ZmR
(s)e−(s−µ)2/2σ2mR
fors >0 and zero otherwise. Note that this distribution is nonzero for all positive values of s. An example of this distribution is shown in figure 6.1
CHAPTER 6. GIBBS SAMPLING APPROXIMATION 97
(dashed line). The normalising constant for this distribution is:
ZmR =σmRe−(µ) 2/2σ2 mR+ 0.5µ q 2πσ2 mR(1 + erf( µ p 2σ2 mR )), (6.4) where erf(·) is the error function.
6.2
Algorithm
6.2.1 The Gibbs Sampler with the Modified Rayleigh Distribu-