# A Piecewise Linear Regression Model Ensemble for Large-Scale Curve Fitting
## 6 Empirical Results
### Selection of \(n\) and \(M\)  
This section will focus on the behaviour of the different selection and combination methods varying \(n\) and \(M\). As shown in the previous section, it is clear that the sample size is determinant in the accuracy and complexity of the LHM. Furthermore, different levels of noise and problem complexities will require different sample sizes in order to obtain models of the same quality. Since the LHM always improves its accuracy with increasing \(N\), the sample size should be large enough to allow the learning algorithm to separate the noise from the underlying structure of the problem. On the other hand, for a fixed \(n\), an increase in the number of sub-samples (\(M\)) also produces more and more accurate models. Figure 12 summarises the performance of all the combination methods when changing the sub-sample size as well as the number of sub-samples. It can be seen that in order to reduce the bias an increase in \(n\) is required, always constrained by the available RAM. In addition, we can achieve a variance reduction by increasing the number of sub-samples. This would result in an increase in CPU-time or, since they are independent processes, the number of threads if concurrent execution is available. In order to assess empirically the impact of these two parameters in the final model, the performance of all the methods was compared, varying \(n\) and \(M\) in each problem. For example, Figures 13 and 14 show their systematic behaviour when changing these parameters. As expected, according to the results of the reference algorithm, higher values of \(n\) also bring better results in terms of accuracy when combining several LHMs. Furthermore, the method based on model selection (MS) always has flatter error curves than the ones based on combination. In spite of the fact that the bias is reduced by increasing \(n\) (in the same way as for the reference algorithm in Figure 10), the MS method does not reduce the variance in the reference algorithm since it is calculated in the same way. Regarding the combination methods, it can be observed that the shapes of their error curves are quite similar in every case. Further insight about the origin of these reductions in the MSE can be found in its bias-variance decomposition. Following Equation (10), the MSE(TTS) was decomposed in these terms. Figures 15 and 16 show that, as expected, an increase in \(n\) causes a decrease in both bias and variance. In addition, increasing \(M\) significantly reduces the variance, whereas the bias remains approximately constant. Figure 12: Impact of the parameters \(M\) and \(n\) on the accuracy of the combination models, and implications in terms of execution time and computing resources. Figure 14: Comparison of the performance of the proposed methods varying the sub-sample size (\(n\)) and the number of sub-samples (\(M\)) in the problem PR4 (calculated with 30 replications). **Top:** Distribution of the MSE over the TTS. **Bottom:** Distribution of the number of knots (\(K\)). The black dashed lines represent the 25 th and 75 th percentiles of the results obtained with the reference algorithm and a sample size of \(N=10\) M.  
Figure 13: Comparison of the performance of the proposed methods when varying the sub-sample size (\(n\)) and the number of sub-samples (\(M\)) in the problem PR1 (calculated with 30 replications). **Top:** Distribution of the MSE over the TTS. **Bottom:** Distribution of the number of knots (\(K\)). The black dashed lines represent the 25 th and 75 th percentiles of the results obtained with the reference algorithm and a sample size of \(N=10\) M.  
Regarding the impact of \(n\) and \(M\) in the complexity of the final models, the bottom of Figures 13 and 14 show the \(K\) curves when varying those parameters. As shown in Figure 9, the reference algorithm fixes higher and higher complexities when increasing the sample size. Therefore, a similar behaviour is expected from the methods MS, MC2, and MC3 (the number of knots of MC1 is always fixed).