# Training from Zero: Forecasting of Radio Frequency Machine Learning Data Quantity
## 2 Materials and Methods
### Predicting the Data Quantity Needed  
Now that the metrics have been compared in terms of a regressed log-linear fit with the quantity of data used to train the model, the question is how to determine what value of the metrics will provide the desired performance. Looking back at Figure 3 shows that the metrics and accuracy do not have an easily fit relationship that would map a metric back to accuracy, and in fact, it would only be trading one non-linear regression for another. To overcome this problem, label whitening to acquire near-perfect performance is proposed to act as a quasar that can help map the performance of the metrics with accuracy. The procedure starts with label smoothing [46] (14) of the truth labels for the evaluation set, followed by a logit transform (15), which, without the label smoothing, would not be a useful approach as infinite values would be returned for the correct class and negative infinity for all other classes. \[\tilde{I}_{x}=l_{x}-\gamma\cdot\left(l_{x}-C^{-1}\right) \tag{14}\]  
\[m_{x}=\log\left(\frac{\tilde{I}_{x}}{1-\tilde{I}_{x}}\right) \tag{15}\]  
Label smoothing applied on its own does not affect the value of accuracy, NCE, nor LogME, but it does affect the LLEP score and is dependent on the smoothing factor, \(\gamma\), and the number of classes in the classification problem, \(C\). The effect of \(\gamma\) on the LLEP metric can significantly affect the metric, so \(\gamma\) is chosen as the minimum value that approaches \(|l_{x}-\tilde{l}_{x}|>0\) within the chosen machine precision. The effect of label smoothing and the logit transform allows for the values to now sit at a finite coordinate to which noise can be added to stochastically decrease the accuracy of the system in a controlled manner. The normal distribution is used to whiten the logits, in this case, where the standard deviation of the noise, \(\sigma\), can be chosen for the degradation of accuracy, \(\epsilon\), of the true labels given the number of classes in the problem space and the label smoothing \(\gamma\) in use. \[\tilde{m}_{x}=m_{x}+\mathcal{N}(0,\sigma^{2}) \tag{16}\]  
\[\sigma(\epsilon)=\frac{\log\left(C^{2}(1-\gamma)+\gamma^{2}(C-1)\right)-\log \left(\gamma^{2}(C-1)\right)}{2\cdot\text{erf}^{-1}\left(2\cdot\sqrt[c]{1- \epsilon}-1\right)} \tag{17}\]  
With the whitened logits the inverse logit, or logistic, transform is applied and balanced such that the sum of any result is unity, \(\sum l_{xi}=1\ \forall\ i\). \[\hat{I}_{x}=\frac{\exp(\tilde{m}_{x})/(1+\exp(\tilde{m}_{x}))}{\sum_{k\in C} \exp(\tilde{m}_{x}[k])/(1+\exp(\tilde{m}_{x}[k]))} \tag{18}\]  
Figure 6 shows the effects of this procedure on the error and metrics for a given \(\epsilon\) averaged over 1000 iterations and shows a trend that can be maintained with increasing \(\epsilon\); however, an important note is that this type of error does not properly reflect the distributions of error that can be expected, so smaller values (\(\leq 10^{-5}\)) of \(\epsilon\) will likely be more appropriate than larger values (0.1). Looking at the residual error, (19), in terms of the dependent variable, \(\epsilon\), relative to the measured value, \(\hat{\epsilon}\), as seen in the top left plot of Figure 6, the minimum average error across the three classes is achieved at \(\Delta(10^{-5},\tilde{\epsilon})=0.0169\), with the average normalized residuals being nearly equal at the extremes (\(\Delta(10^{-8},\tilde{\epsilon})=0.178\); \(\Delta(10^{-1},\tilde{\epsilon})=0.182\)). \[\Delta(\epsilon,\hat{\epsilon})=\frac{\epsilon-\hat{\epsilon}}{\epsilon} \tag{19}\]  
At this point, a means for determining the value for each metric has been proposed that will not suffer from the need to have a perfect response that can be used and will help with metrics such as LogME, where the maximum is not immediately known given the iterative solution that is employed to produce the score. These values for a given small \(\epsilon\) can then be used to regress the corresponding metric's data estimate for achieving such performance.