Pruning (gmix_deflate.m)

Pruning is killing weak modes (a mode is another name for one of the $L$ mixture components). A weak mode is found by testing $\alpha_i$ to see if it falls below a threshold. We have mentioned that $N \alpha_i$ is a measure of how many samples are “used" by mode $i$. To keep this quantity above $kP$, we require $\alpha_i > kP/N$. The quantity $kP$ is called SAMPLES_PER_MODE, or S_P_M in the software. A good choice for $k$ is about 4, so S_P_M = 4*P.

Pruning is handled by software/gmix_deflate.m. This program keeps bumping off the weakest mode and re-normalizing $\alpha_i$ so that $\sum_i \alpha_i=1$. The calling syntax for software/gmix_deflate.m is

	gparm = gmix_deflate(gparm,min_weight_1,min_weight_all)
It is important that very weak modes be obliterated immediately, but it is important not to massacre lots of moderately weak modes all at once. So, there are two input thresholds. Only one mode per call to software/gmix_deflate.m can be bumped off if it falls below min_weight_1. But a mode is always bumped off if it falls below min_weight_all.