Page 315 - Computational Statistics Handbook with MATLAB
P. 315

304                        Computational Statistics Handbook with MATLAB


                             We continue through the data set, one point at a time, adding new terms as
                             necessary. Our density estimate is then given by


                                                            N
                                                   ˆ           ˆ    ˆ  ˆ
                                                                 (
                                                                     ,
                                                   f AM x() =  ∑  p i φ x;µ i Σ i  . )     (8.49)
                                                            i =  1
                             This allows for a variable number of terms N, where usually  N << n  . The
                             adaptive mixtures technique is captured in the procedure given here, and a
                             function called csadpmix is provided with the Computational Statistics
                             Toolbox. Its use in the univariate case is illustrated in Example 8.12.


                             ADAPTIVE MIXTURES PROCEDURE:

                                1. Initialize the adaptive mixtures procedure using the first data point
                                     1 ()
                                   x  :

                                               ˆ  1 ()  1 ()  ˆ  1 ()  ˆ 1()   ,
                                               µ 1  =  x  ,  p 1  =  1  , and  Σ 1  =  I
                                   where  I denotes the identity  matrix. In the  univariate case, the
                                   variance of the initial term is one.
                                                        ( n +  1)
                                2.  For a new data point  x  , calculate  the squared Mahalanobis
                                   distance as in Equation 8.44.
                                                                                 , then create a
                                3. If the minimum squared distance is greater than  t C
                                   new term using Equations 8.46 through 8.48. Increase the number
                                   of terms N by one.
                                4. If the minimum squared distance is less than the create threshold
                                     ,  then update the existing  terms using Equations 8.41
                                   t C
                                   through 8.43.
                                5. Continue steps 2 through 4 using all data points.

                              In practice, the adaptive mixtures method is used to get initial values for
                             the parameters, as well as an estimate of the number of terms needed to
                             model the density. One would then use these as a starting point and apply the
                             iterative EM algorithm to refine the estimates.


                             Example 8.12
                             In this example, we illustrate the MATLAB code that implements the univari-
                             ate adaptive mixtures density estimation procedure. The source code for
                             these functions are given in Appendix D. We generate random variables
                             using the same three term mixture model that was discussed in Example
                             8.9.Recall that the model is given by



                            © 2002 by Chapman & Hall/CRC
   310   311   312   313   314   315   316   317   318   319   320