## 4 Discussion  
Considering the favorable results obtained for the proposed solution and the fact that there is no clear winner among the algorithms considered, it can be stated that the proposed algorithm may be added to the set of anomaly detection algorithms and considered as a potentially optimal solution, depending on the analyzed data. The numerical experiments conducted do not indicate the proposed algorithm as a clear winner. On the other hand, none of the analyzed algorithms can be considered a definitive winner either. The results suggest that, depending on the problem being analyzed, different algorithms may be the best choice. This depends on the data, their distribution in a multidimensional space, and the algorithm itself, specifically how effectively it can separate the relevant areas in the feature space. For the proposed algorithm, the quality of results is influenced by the ease with which hyperspheres can separate the regions containing self-data from those where no data should be present. The difficulty in selecting appropriate run parameters, such as \(r_{\text{min}}\), also has an impact. However, one can imagine that, for certain data, standard algorithm settings, such as Isolation Forest, might yield better results than the proposed NSA with meticulously tuned parameters. The reverse could also be true. Thus, the most important conclusion from the tests conducted is that the proposed NSA should be considered a potentially suitable choice among available algorithms, such as those tested from the PyCaret library, especially considering that specific metrics might hold greater significance in certain applications. For instance, the proposed method has the highest average accuracy, AUC, and recall scores, indicating that it could be a good choice for problems where these metrics need to be maximized. It is worth noting that no algorithm consistently achieved superior values across all metrics in the tests; hence, this should not be considered a disadvantage of the proposed method. Furthermore, it should be noted that it never ranks the lowest and, on the contrary, it tends to achieve results that are either the best or near the middle of the ranking list. Let us return once again to the issue of hyperparameters. It is obvious that their appropriate selection depends on the data. However, to summarize their impact on the obtained results, one can examine how their change affects the metrics in percentage terms. By assuming the relative percentage change as  
\[\frac{\text{best value}-\text{other value}}{\text{best value}}\times 100\%\]  
we can calculate the average value of this change for results obtained from different data and various hyperparameter settings. Averaging over all tested parameter values and all datasets, for accuracy, it amounted to 3.88%, where the largest value was 30.9% and the smallest was 0.03%. For the AUC metric, the average value was 4.22%, the largest was 13.07%, and the smallest was 1.14%. It is apparent, therefore, that, for some data, the proposed algorithm works well over a wide range of hyperparameters; for others, the situation is more challenging. However, developing, describing, and testing various methods for automatically selecting optimal values is beyond the scope of this work. Future work on the proposed solution may encompass several research directions. First, the impact of data normalization procedures can be investigated. In the experiments conducted, none were applied. Their use may influence the ease of estimating certain parameters, such as the minimal detector radius. Additionally, various strategies for automating the process of estimating the anomaly detection threshold can be considered.