# Retinitis Pigmentosa Classification with Deep Learning and Integrated Gradients Analysis
## 5 Conclusions  
This study highlights the significant progress in classifying retinal images associated with retinitis pigmentosa (RP) using deep learning techniques. Three models were used (Inception-v3, ResNet-50, and VGG19) to verify the most efficient approach for the problem in question. The results showed that the models performed similarly, with approximately 80% accuracy in training validation. However, the ResNet-50 model was the one that obtained slightly better results across all the metrics. These results underestimate the model's effectiveness in distinguishing between various genes linked to RP despite the challenges posed by the variability of the dataset and the representation of genes. Integrating data preprocessing techniques, such as balancing and class augmentation, was crucial in improving the model's performance. In addition, the application of integrated gradients (IGs) provided valuable information on the model's decision-making process, validating its focus on relevant retinal features. This interpretability is crucial to ensure the reliability and biological relevance of the model's predictions. The observed performance metrics indicate that while the model performs well in classifying genes with ample training data, there is room for improvement in handling less represented gene classes. The lower recall and F1-score for certain genes highlight the impact of data imbalance on the model's effectiveness. The ROC curve analysis, with a mean AUC of 0.91, further confirms the model's strong ability to differentiate between most gene classes. However, one gene showed notably lower AUC, suggesting more representative samples were needed. Analysis of the confusion matrices clearly showed that the model could correctly classify some of the less representative classes in the test data. Unlike other more representative classes, despite having more data to classify in the test, they were also trained with more data and obtained much lower percentages of correctness. On the other hand, the less representative classes were also the ones with the worst results on the test data, with some of them obtaining 0% correct. Thus, more data is needed for these results, but some of the classes will be more easily identified by the model, even with little representation in the training, than others. Our future work will focus on expanding the dataset to include a broader range of genes and images, particularly targeting those with fewer samples. This expansion aims to improve the model's generalizability and address current limitations. Additionally, exploring more advanced deep learning architectures and further enhancing interpretability methods will be important in refining the model's accuracy and applicability. By advancing artificial intelligence in retinal imaging, we strive to contribute to the early and accurate diagnosis of inherited retinal diseases. This progress holds promise for improving clinical practices and patient outcomes through more precise genetic analysis and personalized treatment approaches. Our continued commitment to research and collaboration with medical institutions will be essential in realizing the full potential of AI-driven tools in healthcare. Conceptualization, H.F., A.C. and A.M.; methodology, H.F. and J.M. ; software, J.M. ; validation, J.P.M., J.M.B. and I.C. ; formal analysis, A.M.; investigation, H.F.; resources, A.M.; writing--original draft preparation, H.F.; writing--review and editing, J.M. ; visualization, A.M.; supervision, A.C.; project administration, A.C.; funding acquisition, A.M. All authors have read and agreed to the published version of the manuscript. This study was funded by the Doctoral Scholarship of the Portuguese Ophthalmology Society, by Fundacao para a Ciencia e Tecnologia, IP (FCT) within the R&D Units Project Scope: UIDB/00319/2020 (ALGORITMI), and by FCT I.P. under the project Advanced Computing Project 2024.AIVLAB. 00008.VISION. It was produced with the support of Rede Nacional de Computacao Avancada (RNCA).