# ANN Sizing Procedure for the Day-Ahead Output Power Forecast of a PV Plant
## 4 Evaluation Indexes
### NMAE Statistical Distributions and Confidence Limits  
In order to study \(NMAE_{\%}\) behavior with respect to a specific ANN setting, this setting is assigned a starting constant value, and \(n_{t}\) forecasts are performed. For each \(i\)-th forecast (_trial_), the \(NMAE_{\%}\) is calculated. From a statistical point of view, the group of these \(NMAE_{\%}\) values represents a sample of the endless population of all of the possible \(NMAE_{\%}\) values related to the forecast performed with those specific ANN settings. After the same parameter has been changed, further \(n_{t}\) forecasts are performed, and the associated \(NMAE_{\%}\) values are calculated. This procedure is repeated until the maximum value of the ANN parameter is reached. As this value could be as great as possible, a reasonable threshold is set. Intuitively, a higher accuracy could be obtained by increasing the number of forecasts for each network, but the highly time-consuming process should be compensated for by a much more striking performance, otherwise it is not worthy. Therefore, a tradeoff between the computational burden and the expected accuracy is defined. Considering the group of \(NMAE_{\%}\) valuesbelonging to the same test set obtained by the ANN with those given \"\(p\)\" settings, the relative sample mean \(\overline{NMAE}_{p}\) is an estimator of all of the possible \(NMAE_{\%}\) values, and it is defined as:  
\[\overline{NMAE}_{p}=\frac{1}{n_{t}}\sum_{i=1}^{n_{t}}NMAE_{i,p} \tag{6}\]  
where \(NMAE_{i,p}\) is the \(NMAE_{\%}\) calculated for the \(i\)-th trial performed by the ANN with the \(p\)-th value of a given setting. In our case, the distribution of the \(NMAE_{i,p}\) population is unknown. However, the sample mean can be calculated (3), as well as the sample variance \(S_{p}\)2:  
\[S_{p}^{2}=\frac{1}{n_{t}-1}\sum_{i=1}^{n_{t}}\bigl{(}NMAE_{i,p}-\overline{NMAE }_{p}\bigr{)}^{2}. \tag{7}\]  
The sample standard deviation, \(S_{p}\), is:  
\[S_{p}=\sqrt{\sum_{i=1}^{n_{t}}\frac{\bigl{(}NMAE_{i,p}-\overline{NMAE_{p}} \bigr{)}^{2}}{n_{t}-1}}. \tag{8}\]  
Any statistic estimating the value of a parameter is an \"estimator\" or a \"point estimator\" [32]. It is often impossible to know if the point estimator is correct, because it is merely an estimation of the actual value (which is, in our case, impossible to find, unless after performing an endless number of forecasts). For this reason, we construct confidence limits \(CI\) helping the estimation of the unknown population mean \(\mu\), which are defined as the sample mean with a margin of error \(ME\):  
\[CI=\overline{NMAE}_{p}\pm ME. \tag{9}\]  
The \(ME\) is set according to:  
1. how confident we want to be with our assessment;
2. the sample standard deviation \(S\); and
3. how large our sample size is.  
In this way, we are able to define the probability \(\alpha\) that the mean of the population \(\mu\) has to fall outside our \(CI\), which is split into the two tails of the probability density curve for the \(t\)-Student curve. In this way, the \(ME\) is defined as:  
\[ME=t_{\frac{\alpha}{2}}\left(\frac{S_{p}}{\sqrt{n_{t}}}\right). \tag{10}\]  
For example, when \(\alpha=0.05\) (which implies that \(CI=95\%\)), the critical value \(t_{\alpha/2}\) is set by the relative \(t\)-Student distribution selected according to the degree of freedom equal to \(n_{t}-1\). Now that the distribution has been estimated, it is possible to define appropriate confidence intervals in which the mean \(\mu\) of the population can be included, according to the sample mean \(\overline{NMAE}_{p}\).