## 2 Materials and Methods
### Layer 2  
**Step 1.** Determining the \"candidate\" classes (notated with \({\rm k_{c}}\), \({\rm k_{c}}\in\) [\({\rm K_{opt}}\)]) for the placement of SCADA measurements based on a ranking established according to correlation coefficients in reverse order beginning with those which have the highest values. The Decision Maker will impose a threshold (\({\rm CC_{threshold}}\)) for an average value of CC to choose the \"candidate\" classes [35].  
**Step 2.** Identifying the set of the pilot EDSs that will be integrated into the SCADA system belonging to each \"candidate\" class.  
\[\left\{N_{pilot}^{EDS}\right\}=\left\{n_{k}\in k_{c}|CC_{k}>CC_{threshold}\right\} \tag{14}\]  
where \({\rm n_{k}}\) represents the number of the EDSs from each \"candidate\" class \({\rm k_{c}}\), \({\rm k_{c}}\in\) [\({\rm K_{opt}}\)]; \({\rm CC_{threshold}}\) is the threshold up to which pilot EDSs from each \"candidate\" class \({\rm k_{c}}\), \({\rm k_{c}}\in\) [\({\rm K_{opt}}\)] are chosen.  
The pilot EDSs will represent the optimal places to perform the SCADA measurements such that the load flow calculations are to be carried out in the MV EDNs.  
**Step 3**. Building the accurate, robust, and interpretable multiple linear regression (MLR) models to estimate the active powers in the EDSs from the other classes that were not included in the set of the \"candidate\" classes. The models will use the pilot EDSs as regressors identified in Step 2.  
\[\begin{array}{l}P_{t,m}^{(e)}=\beta_{0,m}+\sum\limits_{p=1}^{n_{k}}\beta_{p,m}P_{t,p}^{(r)},\ t=1,\ldots,T\\ m\in\left\{k_{nc}\right\};\ p\in\left\{N_{pilot}^{EDS}\right\};\ \left\{N_{EDS}\right\}=\left\{N_{pilot}^{EDS}\right\}\cup\left\{N_{k_{nc}}\right\} \end{array} \tag{15}\]  
where \(\left\{{\rm N_{k_{nc}}}\right\}\)--the set of the EDSs non-included in the \"candidate\" classes; [\({\rm N_{pilot}}^{\rm EDS}\)]--the set of the pilot EDSs with SCADA measurements integrated; [\({\rm N_{EDS}}\)]--the set of the EDSs from the analysed EDN; \({\rm P_{t,m}}^{(e)}\)--the value of the active power estimated in the EDS \"m\" from the set \(\left\{{\rm N_{knc}}\right\}\), in [kW]; \({\rm P_{t,p}}^{(r)}\)--the value of the active power measured in the pilot EDS \"p\" from the set [\({\rm N_{pilot}}^{\rm EDS}\)], in [kW]; \(\beta_{0,m}\)--the constant coefficient of the linear regression model for each EDS from the set \(\left\{N_{knc}\right\}\); and \(\beta_{p,m}\)--the coefficients corresponding with each regressor associated with the pilot EDS \"p\" from the set [\({\rm N_{pilot}}^{\rm EDS}\)] in the linear regression model for each EDS from the set [\({\rm N_{knc}}\)].  
**Step 4**. Analysing the performance of the regression models based on the following metrics: percentage error (PE), average percentage error (APE), and mean absolute percentage error (MAPE):  
\[PE_{t,m}=\frac{\left|P_{t,m}^{(r)}-P_{t,m}^{(e)}\right|}{P_{t,m}^{(r)}}\cdot 1 00,\ t=1,\ldots,T,\ m\in\left\{N_{k_{nc}}\right\},\ [\%] \tag{16}\]  
\[APE_{m}=\frac{1}{T}\sum\limits_{t=1}^{T}PE_{t,m},\ m\in\left\{N_{k_{nc}} \right\},\ [\%] \tag{17}\]  
\[MAPE=\frac{1}{N_{EDS}}\sum\limits_{n=1}^{N_{EDS}}APE_{n},\ [\%] \tag{18}\]where P(r),tm is the real value of the active power recorder in the EDS m at the hour t, t = 1, \(\ldots\), T, and P(e),tm is the estimated value of the active power in the EDS m at the hour t, t = 1, \(\ldots\), T, with the MLR model.