# BoxRF: A New Machine Learning Algorithm for Grade Estimation
## 4 Discussion  
The newly proposed method, BoxRF, combines the strengths of classical geological modeling techniques with the strengths of modern-day machine learning. While classical techniques make use of one search box based on search radius, BoxRF uses many random boxes. Thus, there are more opportunities to capture trends. Like classical methods, where search radii and directions are guided by variogram modeling, the boxes in BoxRF are also ideally guided by variogram modeling. While machine learning uses mean or median values of leaves for prediction, BoxRF applies inverse distance methods, honoring the geological principle that nearby samples are usually more relevant than far-away samples. When the prediction method is switched in BoxRF from the inverse distance to the median value, the performance drops. For example, a BoxRF with a box length, width, and height of [50; 100] each, NR = 2, and FH = 2 has an R\({}^{2}\) of 0.59 compared to 0.75. This was seen with the other top-performing hyperparameters as well. This shows that the application of the inverse distance method better captures the geology within a small space than a simple median and explains why it outperforms SRF. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**BL** & **BW** & **BH** & **T** & **MS** & **NR** & **FH** & **Validation R\({}^{2}\)** & **Range of Validation R\({}^{2}\)** & **Test Set R\({}^{2}\)** \\ \hline
[100, 300] & [100, 200] & [50, 100] & 7 & 3 & 1 & 1 & 0.706 & 0.060 & 0.750 \\
[100, 300] & [100, 200] & [50, 100] & 11 & 5 & 1 & 1 & 0.7  
The role of power in the inverse distance method was also investigated due to its effect on prediction variance. The R\({}^{2}\) for powers 0, 1, 2, 3, 4, and 5 were 0.56, 0.71, 0.75, 0.75, 0.74, and 0.73. Clearly, simple averaging (power 0) was not effective, just as the median was not (as reported earlier). The sweet spot was a power of 2 or 3. The effect of power on the prediction of high-metal values (top 2.5%) was similar, with best prediction performance stabilizing at power = 3. Experiments were also conducted on the algorithm for prediction from the forest, i.e., the method of aggregating predictions from individual trees. The complicated algorithm was replaced by the simple mean and the simple median so that the prediction of the forest was the mean or median prediction of trees. Replacing the forest prediction algorithm with the mean or the median had no impact on performance, indicating that the trees did not produce too many skewed predictions. The algorithm was designed to honor skews if they happened. The role of orphans was also investigated. As expected, it was trivial. Only 0.25% of the samples in the forest were orphans. Thus, the orphan reduction strategy (make several attempts to lay boxes) in the algorithm has been effective, as so few samples become orphans. The net effect is that only a trivial number (0.5%) of the predictions came from orphans. The consistency in performance for a given set of BoxRF hyperparameters is encouraging. This demonstrates that the method resists overfitting, as one could increase/decrease the number of trees and box dimensions without worry. As for NR, it is best defaulted to 2 to avoid instances of boxes that do not represent their space well. Once NR is set to 2, it is adequate to have FH set to 1, as most boxes are likely to define their space well. Thus, prediction from the first hit should be quite good. Setting NR to values greater than 2 may result in overfitting, as some samples are utilized a lot more than others, though the tree prediction aggregation method (to obtain the forest prediction) has some built-in protection against that. The results also showed how BoxRF performance mirrored observations made through the classical technique of variograms. This builds trust in the method. The box dimensions that performed the best were exactly as \"predicted\" by variograms. Boxes much longer than the variogram range did not perform well.