This demo shows how the k-LinReg algorithm [Lauer, 2013] solves switched linear regression problems by minimizing the global Mean Squared Error over $ N $ data points and $ n $ models, defined as $$ MSE = \frac{1}{N} \sum_{i=1}^N \min_{j=1,\dots, n} (y_i - \theta_j^T x_i )^2 $$

(x = , y = ) |
Simulation data: Number of data: Number of models: Models: |

Number of models:

Number of restarts:

or see how it works

Estimated models:

Computing time =

Root Mean Squared Error =

green bars indicate possible successes (when MSE equals the best MSE over all restarts)

red bars indicate failures (when a mode gets no data points)