# Application of Artificial Intelligence in Support of NAFLD Diagnosis
## 4 Discussion  
In order for a doctor to use the system consciously, they must understand how it works. It does not mean, however, that every doctor has to learn how AI algorithms work from scratch. It is enough to present them with the cause-and-effect sequence that led to the diagnosis. This approach is designed to build trust in the doctor-machine relationship. If the doctor understands how the program makes decisions, then there will be no need to  
Figure 6: Ensemble model’s confusion matrix. Figure 7: Plot showing how the system behaves with the influx of new data. constantly question the accuracy of the diagnosis. In addition, his work will be made easier and faster without losing the quality of treatment. As part of the study conducted, feature importance values were extracted from each base model, and Shapley value analysis was performed where possible. These analyses aimed to identify key attributes that can act as disease markers, i.e., features that are particularly important in the diagnostic process. An example explained diagnosis is shown in Figure 8.  
The attributes that most models looked at were the four traits C12:0, C11:0, DGLA, and GPx. Other attributes such as C14:0, C22:0, HDL, or EPA were used by single models but were very important to them. For this reason, these traits were considered biomarkers of NAFLD disease. Varying sets of biomarkers for different models can create confusion for physicians who are trying to make decisions based on these results. To address this problem, an integrated approach is needed to enable physicians to understand how different models interpret these biomarkers. Through comparative analyses and visualizations, physicians will be able to gain greater insight into which biomarkers are most relevant in the context of a particular disease, as well as what conclusions can be drawn from different rankings. This approach not only increases the transparency of the models, but also supports physicians in making more informed clinical decisions based on a consistent understanding of the extracted biomarkers. Further research and validation of these traits in a clinical context is needed to confirm their usefulness as disease markers. Incorporating these features into clinical practice could improve the accuracy of diagnosis, enabling earlier detection of disease and a more precise approach to patient treatment. The above-described data provide a valuable basis for achieving the research objectives of this thesis. Although the current dataset is sufficient for conducting preliminary analyses and building diagnostic models, in the context of further refinement of these models and their implementation in a production environment, it needs to be bigger and more data need to be acquired. A larger dataset will allow better capture of rare cases, improve the overall performance of the models, and increase their ability to generalize. Further data collection from various hospital units and other medical institutions will enable the creation of more comprehensive and versatile models that can be successfully applied in everyday clinical practice. For this reason, the technical infrastructure for automatic aggregation and processing of data from various sources was created as part of this work. The system is equipped with advanced pipelines that systematically feed the database with the latest medical data. This makes it possible to continuously update and expand the dataset, which is crucial for improving the efficiency and accuracy of predictive models. Figure 8: Explanation of patient’s diagnosis. It may help a doctor to understand why the model has decided to diagnose a patient in that way. In this example, the value of the C12:0 attribute has a 32.7% effect on this patient being diagnosed as healthy. In terms of time complexity, the implementation of the developed model is based on efficient computational algorithms that ensure its feasibility in practice.