# An Octahedric Regression Model of Energy Efficiency on Residential Buildings
## 2 Materials and Methods
### Full and Restricted Models as a Prevention of Overfitting  
Equation (43) shows the dependence of the estimator on the parameter h. However, the algorithm includes one additional parameter, \(\omega\), used in the radial function. Let us order the points depending on the distance to \(x_{o}\). Taking Equation (54) of the function \(W^{0}(x)\) at the support points \(x_{o}\pm\frac{h}{2}\cdot e_{i}\),  
\[W^{0}\bigg{(}x_{o}\pm\frac{h}{2}\cdot e_{i}\bigg{)}\approx\[PERSON]\bigg{(}\frac{h}{ 2},\omega\bigg{)}\cdot\Bigg{\{}1+\frac{\[PERSON]\big{(}\|x_{1}-x_{o}\mp\frac{h}{2} \cdot e_{i}\|,\omega\big{)}}{\[PERSON]\big{(}\|\frac{h}{2},\omega\big{)}}+...+\frac{ \[PERSON]\big{(}\|x_{p}-x_{o}\mp\frac{h}{2}\cdot e_{i}\|,\omega\big{)}}{\[PERSON]\big{(} \frac{h}{2},\omega\big{)}}\Bigg{\}}, \tag{57}\]  
The term on brackets represent the relative weight of each sample point in the weighted average. Summing up the contributions on each support point, the result can be written as  
\[1+\Psi(x_{1}-x_{o},\omega)+...+\Psi(x_{p}-x_{o},\omega), \tag{58}\]  
where  
\[\Psi(x_{k}-x_{l},\omega)=\frac{\sum_{i=1}^{d}\Bigl{\{}\[PERSON]\big{(}\|x_{k}-x_{l} -\frac{h}{2}\cdot e_{i}\|,\omega\big{)}+\Phi\big{(}\|x_{k}-x_{l}+\frac{h}{2} \cdot e_{i}\|,\omega\big{)}\Bigr{\}}}{2\cdot\mathrm{d}\cdot\Phi\big{(}\frac{h }{2},\omega\big{)}}, \tag{59}\]  
The value of  
\[\Pi(x_{r})=1+\sum\
olimits_{k\
eq r}^{p}\Psi(x_{k}-x_{r},\omega), \tag{60}\]  
represents the weight of all the points in the estimation of the model calculated at \(x_{r}\). At zero order in \(h\), Equation (59) implies that Equation (60) is approximately  
\[\Pi(x_{r})\approx 1+\frac{\sum_{k\
eq r}^{p}\Phi(\|x_{k}-x_{r}\|,\omega)}{ \Phi\big{(}\frac{h}{2},\omega\big{)}}, \tag{61}\]  
By Equation (25), the fractions converge very fast to 0 as the distance to \(x_{r}\) growths, and the only contribution depends on the points that are at a distance similar to the nearest point, that is, when \(\Phi(x_{k}-x_{r},\omega)\approx\Phi\big{(}\frac{h}{2},\omega\big{)}\). The number of q points involved are determined by the value of the parameter \(\omega\), and \(c_{S}(x_{o})\) is a weighted mean of the q-nearest points. So, the octahedric regression presented in the present paper corresponds to a mean of a simpler estimator calculated on the support of size h defined around \(x_{o}\). These simple estimators correspond to the weighted average of the \(q(x_{o},\omega)\)-nearest neighbours. In the limit, \(\omega\to 0\), \(c_{S}(x_{o}\pm h\cdot e_{i})\) are obtained from the nearest point. In the case of considering all the experimental points, the model is called full. In that case, when \(h\ll 1\), the nearest to the support points will be very frequently \(x_{o}\), and then: \(c_{S}(x_{o}\pm h\cdot e_{i})\to y_{o}\), and according to Equation (43), \(\hat{z}(x_{o})\to y_{o}\), confirming the trend to overfitting.  
The overfitting is caused by the incorporation of noise to the model. If the point that is being calculated is not included in the estimation, the points that are used to obtain the values of \(c_{S}(x_{o}\pm h\cdot e_{i})\) have a greater probability of presenting independent noise influence, diminishing in that form the overfitting. The new model calculated in this form is called restricted and corresponds to having a cross-validation for each experimental point where the test set is formed by itself.