Optimization of Probabilistic Switching Models Based on a Two-Step Clustering Approach