13.07.2015 Views

View - Statistics - University of Washington

View - Statistics - University of Washington

View - Statistics - University of Washington

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

98ˆσ 2 j =∑ Ni=1 ˆQ ij (Y i − ˆµ j ) 2∑i ˆQ ij(5.74)Significant computational savings can be achieved by calculating these estimatesin a slightly different way. With equations 5.72, 5.73, and 5.74, an iterationover all N pixels is needed. This will make the algorithm take time proportional tothe number <strong>of</strong> pixels. However, this time can be reduced to a time proportional tothe number <strong>of</strong> unique values in the data. This is done by creating a list <strong>of</strong> uniquedata values and counting the number <strong>of</strong> pixels with each value (like a histogram).The parameter estimates can be computed by iterating over the unique data valuesinstead <strong>of</strong> the pixels. This makes the algorithm operate in constant time withrespect to the number <strong>of</strong> pixels; the time is linear in the number <strong>of</strong> unique datavalues. The time saved by this change is enormous. For instance, with a 256-levelgreyscale image, we will have at most 256 unique values, regardless <strong>of</strong> whetherthere are thousands or millions <strong>of</strong> pixels. The equations for computing estimatesin this way are shown in equations 5.75, 5.76, and 5.77. My Splus implementationand my XV implementation both use this time-saving approach.Suppose there are C unique data values (e.g. C = 256 grey levels). Let Vdenote the unique data values, so V is a vector <strong>of</strong> length C. Let H i be the number<strong>of</strong> pixels with the ith unique data value, so H is like a histogram <strong>of</strong> the data.Define R the same way as Q, except that each row is for a unique data valuerather than a particular pixel. In other words, R ij is the probability that the ithunique data value being generated by the jth component. As with Q, each row <strong>of</strong>R must sum to 1. The sum <strong>of</strong> all elements <strong>of</strong> R will be equal to C.ˆP j = 1 NC∑H i ˆRij (5.75)i=1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!