TL;DR
Clusterwise Linear Regression (CLR) excels at identifying local linear patterns but historically struggles with a "prediction gap": assigning new data points to clusters without knowing their target values. This research introduces predictive CLR (CLR-p) and constrained CLR (CLR-c) to bridge this gap, transforming CLR into a high-performance predictive model that rivals Support Vector Regression (SVR) and Random Forests.
The Prediction Gap in CLR
Standard linear regression assumes a single global relationship fits all data. CLR relaxes this by partitioning data into $k$ clusters, each with its own linear model. However, a major hurdle exists for prediction: to pick the right linear model for a new test point, you typically need to know its cluster label. Since CLR clusters are defined by the relationship between features ($X$) and the target ($y$), and $y$ is what we aim to predict, the model is stuck in a chicken-and-egg loop.
As illustrated in Figure 1, clusters based on correlation (slopes) are not always spatially separated. Simple heuristics like "nearest cluster center" often fail when different linear trends occupy the same feature space, necessitating more sophisticated assignment strategies.
Methods: CLR-p and CLR-c
The authors propose two distinct strategies to resolve the cluster assignment problem:
- Predictive CLR (CLR-p): This method treats cluster assignment as a supervised learning problem. After training a CLR model on historical data, a separate classifier (e.g., Random Forest or Logistic Regression) is trained to predict the resulting cluster labels using only the features ($X$). At test time, this classifier tells the system which linear expert to consult.
- Constrained CLR (CLR-c): This approach leverages "natural" groupings in the data. For example, in medical datasets, patients treated at the same hospital can be constrained to the same cluster. Because the hospital ID is known at test time, the model knows exactly which cluster a new patient belongs to without guesswork.
- Ensembling: Since CLR is NP-hard and sensitive to initial conditions, the authors found that training multiple models with different random starts and averaging their predictions significantly boosts accuracy and reduces variance.
Key Results and Performance
The researchers evaluated their methods on UCI benchmarks (Boston Housing, Abalone, Auto-mpg) and a massive real-world health insurance dataset containing 400,000 claims.
- Accuracy: On UCI datasets, CLR-p (using Random Forest as the label predictor) performed on par with SVR and consistently outperformed standard Linear Regression.
- Scalability: On the large-scale medical dataset, CLR-c was the clear winner. It achieved the highest accuracy while being significantly faster than other methods. Notably, SVR failed to complete training on this dataset within 15 hours, whereas CLR-c handled it with ease.
- Efficiency: CLR-c is only about 20 times slower than simple linear regression, making it a highly viable alternative for production environments where complex neural networks might be too computationally expensive.
Insights and Limitations
A key takeaway is that spatial proximity (like k-means) is often at odds with regression clustering. A point might be physically close to one cluster but follow the linear trend of another. By learning the label function (CLR-p) or using domain constraints (CLR-c), the model respects these hidden correlation patterns.
However, the success of CLR-p is bottlenecked by the accuracy of the underlying label classifier. If features do not clearly distinguish the clusters, performance degrades toward a global average. Additionally, CLR-c requires users to identify meaningful constraints beforehand, which may not be available in every dataset. Future work will focus on improving the interpretability of these local linear experts for end-users.
Summary updated