These results may indicate that more competition is needed. Another solution for segmentation is to look at the output history of the gate in Figure 4-11: the maximum value is for the winner, but the waveform gives good segmentation information. 0 500 1000 1500 2000 2500 3000 3500 Figure 4-11 History of the gate: full line is for expert 1, dotted line is for expert 2 OLS clustering. Figure 4-12 shows the results of approach II for OLS clustering. The prediction error is in the exact same range as with k-means clustering, but the segmentation on that approach is performed far better: all mandatory breaths are detected well. Actually, this model exhibits a behavior opposite that of the previous model: the mandatory breaths are well detected, but the detection of return to regime 2 takes longer (10 to 90 samples more): this is a first hint that the switching mechanism is not symmetric, an issue we will further develop in chapter 5. Also, there is a fundamental difference between those two clustering algorithms: the k-means algorithm tries to find similarities by assigning a data point to the closest cluster, whereas the OLS algorithm tries to finds each added center with respect to how much more than the others it explains, or dissimilar from the others it is.