ARTIFICIAL INTELLIGENCE BASED RATING OF CARPAL TUNNEL SYNDROME EFFICACY IN CLINICAL DIAGNOSIS

Objective: The most common entrapment neuropathy seen by the clinician is Carpal tunnel syndrome (CTS). CTS is graded as mild, moderate, and severe according to the results obtained on electroneuromyography (ENMG) by clinicians. We aimed to show the effectiveness of the use of artificial intelligence in clinical diagnosis in the grading of CTS. Methods: In our study, the data of 315 people with a pre-diagnosis of CTS were used and classified into four classes based on AI as CTS grade. Machine Learning (ML) algorithms Ensemble, Support Vector Machine (SVM), K-Nearest Neighbor (KNN), and Decision Tree (Tree) algorithms were used in classification processes. 10% Hold-out validation was used and the learning rate was determined as 0.1. As a result of the classification, accuracy, precision, sensitivity, specificity, and F1-score performance values were obtained. Results: SVM made the best estimation and KNN made the worst estimation in the 0 class. The best estimate in class 1 belongs to the Support Vector Machine. Ensemble and Tree made the best guesses in the 2nd and 3rd grades. In our study, the best algorithm with an overall success rate is SVM with 93.55%. Conclusion: The results showed that ML algorithm models consistently provided better predictive results and would assist physicians in determining the medical treatment modality of CTS. Artificial intelligence (AI) techniques are reliable methods that assist clinicians to deliver quality healthcare.


Introduction
Neurological diseases are acute, chronic or progressive clinical manifestations that occur as a result of neurodegeneration in the central and peripheral nervous system.The increase in the elderly population and the inadequacy of treatments in chronic processes increase the cost of neurological diseases day by day.In recent years, deep learning algorithms have been used to increase the early diagnosis and treatment possibilities of neurologists. 1 The recognition of artificial intelligence (AI) dates back to the 1950s. 2 AI aims to develop a method for capturing and solving complex problems based on large amounts of data. 3It also has the effect of changing the current model in the diagnosis, treatment, prediction, and economics of neurological diseases. 2It has been understood that with the use of artificial intelligence, it becomes easier to diagnose permanent neurological damage and even guides the prevention of diseases. 1Studies in stroke, dementia, epilepsy and movement disorders have shown that machine learning will contribute greatly to the future of neurologic diseases 4 , but there has not been enough studies on peripheral nerve diseases yet.Carpal tunnel syndrome is one of the most common peripheral neuropathies in the active working adult population, affecting daily activities and reducing work efficiency.It occurs by compression of the median nerve in the carpal tunnel and causes sensory and motor complaints in the first three fingers of the hand.It is known that the common risk factors of CTS are; female gender, high body mass index (BMI), advanced age, and repetitive hand movements. 5The incidence of CTS is approximately 3.0% in women and 2.1% in men. 6lectroneuromyography (ENMG) is the most frequently used auxiliary diagnostic tool in the diagnosis of CTS.[9][10][11] The severity of CTS is graded as mild, moderate, or severe based on the results of the data obtained in ENMG. 12The treatment option is mostly determined according to this grading result. 13The treatment options for CTS are, in order, from mild to severe; medical treatment, rest splints and surgical treatments.If severe CTS is left untreated, it can cause irreversible damage of median nerve, causing atrophy and weakness in the hand muscles.Before AI systems can be used in healthcare applications, they need to be trained using data from clinical activities such as screening, diagnosis, treatment assignment, etc., so that similar subject groups and relationships among them can be learned.Machine learning (ML) creates data analytics algorithms to extract features from data. 14,15he use of algorithms with high predictive power and success rate increases the accuracy of early diagnosis.The studies on this subject and the success of the applied devices emphasize the importance of machine learning in the field of medicine. 16It enables ENMG to be used as a guide in following the course of the disease and determining the treatment method.However, the reliability of the ENMG test can be very variable due to factors such as the experience of the person performing the test, the technical characteristics of the device used, and the patient's compliance with the test.Considering these factors, there are studies conducted with machine learning algorithms. 14here are several algorithms in different libraries of machine learning.The ML algorithms used in this study are Ensemble, Support Vector Machine (SVM), K-Nearest Neighbor (KNN), and Decision Tree (Tree).The ensemble can improve classification performance.Findings of classifiers with varying accuracies are combined with an ensemble-based approach. 17Even when using multiple sets of measures with ML algorithms, classification performance may not necessarily improve.In this context, Ensemble methods are multi-classifier systems in which individual weak classifiers are combined to create a more robust classification system. 18VM is a fairly robust classification method for disease diagnosis. 19According to other machine learning algorithms; It is widely used in medical research due to its many advantages such as being effective in cases where the sample size in the study is less than the number of dimensions, using different kernel functions in the decision mechanism, having unbalanced data, giving more effective and successful results in big data, and working with a large number of independent variables. 15,20,21NN is a lazy learning approach as there is no clear training process.There is a K value determined in the study to classify KNN, and this value indicates the number of elements that the algorithm will look at in the data set.It is a statistics-based method. 17,18It is one of the highly preferred machine learning algorithms because of its simplicity and resistance to complex training data. 17ecision Tree is an algorithm whose structure is based on probability and statistics.Decision trees consist of general-specific and downward-trained data. 22,23lassification of data in decision trees consists of two stages, namely learning and classification.The training data known before the learning phase is examined by the classification method to reveal the model.This learned model is specified as classification rules.In the second stage, the classification stage, the test data is used to query whether the decision tree is correct. 21,23old-out validation is recommended to eliminate the overfitting problem.Here, the data is divided into two non-overlapping parts and one is trained while the other is tested with the trained model.People often don't understand this very clearly, and they consider waiting for validation to be dividing data into two equal parts.While it's true that it could be called a hold verification, it's a very specific standby verification case where 50% of the data held for testing is.Therefore, wait validation may have different percentages. 24

Methods
In our study, the original data of 315 people who applied to Electroneuromyography laboratory of Sakarya University Training and Research Hospital with a preliminary diagnosis of CTS and underwent electromyography examination were used.Demographic data such as age, gender, height, weight, dominant hand, body mass index (BMI) and EMG conductions were recorded by the author M.A. and database were prepared by him.BMI is classified according to the criteria determined by the World Health Organization. 25he motor and sensory latency, sensory and motor amplitude, and conduction velocity values of the median and ulnar nerves were evaluated by EMG, and CTS was graded by the clinician.NCSs were made by a specialist neurologist using the same EMG device at 24°C using standard conduction procedures.CTS grading was performed by the same specialist neurologist according to the electrophysiological parameters stated by Padua. 26rom the Carpal Tunnel Syndrome data used in the experimental study, it was classified based on artificial intelligence in 4 classes as CTS grade (0 normal, 1 mild, 2 moderate, 3 severe).Ensemble, Support Vector Machine (SVM), K-Nearest Neighbor (KNN), and Decision Tree (Tree) algorithms from ML algorithms were used in classification processes.10% Hold-out validation was used and the learning rate was determined as 0.1.In the figure 1 below, the ratio of the total number of female/male samples to the overall sample number is given.

Simulation Results and Performance Evaluation
As a result of the classification in the experimental study, accuracy, precision, sensitivity, specificity, and F1-score performance values were obtained.To better present these results, ROC (Receiver Operating Characteristic) curves graphics were drawn.The complexity matrix shown in Table 2 is used to calculate performance metrics (Table 2).  2 True Negative, 3 False Positive, 4  The complexity matrix obtained as a result of the study is shown in Figure 3.In this matrix, each algorithm is classified into 4 different groups as the CTS grade of the algorithm (0 normal, 1 mild, 2 modarete, 3 severe).

Figure 3. Confusion matrix
While the SVM algorithm correctly classified all the data in the "0 normal" class, the Ensemble and Tree algorithms predicted 4 of the data in the "1 mild" grade and misclassified them, while KNN predicted 5 of them in the "1 mild" class and classified them incorrectly.Likewise, their performance in other classes can be seen in Figure 3 (Figure 3).If we evaluate the results in Figure 3 in general, SVM made the best prediction in 0 grade and KNN made the worst prediction.The best estimate in grade 1 belongs to SVM.Ensemble and Tree made the best guesses in the 2nd and 3rd grades.Using the numerical values obtained from the complexity matrix given in Figure 3, when substituting in equations 1, 2, 3, 4, and 5, the overall performance results of the Carpal tunnel syndrome grade classification data are calculated in Table 3 (Table 3).When we evaluate Table 3, the best overall success is SVM with 93.55%.This is followed by Ensemble with  It is seen that SVM has the best area in the ROC curve graph, which is a different graph showing the performances of the algorithms (Figure 4).This is followed by Ensemble, Tree, and KNN, respectively.

Figure 5. Training confusion matrix
The confusion matrix obtained at the end of training the data is shown in Figure 5 (Figure 5).When the confusion matrices obtained at the end of the trainings were compared, SVM predicted 156 data belonging to the zero class correctly, while it predicted only one data to be one class incorrectly.Likewise, while it correctly predicted ten data belonging to three classes, it achieved a high performance by estimating only one data as one class incorrectly.Likewise, while Ensemble correctly predicted 91 data belonging to the 1 class, only 1 data was incorrectly predicted to have two classes.He predicted all other data correctly.The performances of other algorithms are as seen in Figure 5.
Datasets analyzed during the current study are available from the corresponding author by appropriate request.

Discussion
ENMG is used not only to determine the treatment modality in CTS but also to determine the severity of median nerve entrapment.This enables the usage of ENMG in following up on the progress of the disease and guiding the determination of the treatment modality.However, the reliability of the ENMG test can be very variable due to factors such as the experience of the person performing the test, the technical characteristics of the device used, and the patient's compliance with the test.In addition, the value of the test may vary according to the purpose of the test, for example, the sensitivity of the test should be maximized in order not to miss any case in the CTS to be performed in the industry sector. 27 The exponential increase in publications on AI in recent years and the focus on artificial intelligence in professional and scientific meetings in recent years emphasize the importance of this issue. 14Diagnosing and managing diseases is a difficult task that cannot be obtained from textbooks or classroom information.It is gradually acquired through years of observation and experience. 28CTS is an entrapment neuropathy with a wide range of symptoms and signs.Accurate grading of CTS is important, as choosing the right treatment option may vary depending on the severity of CTS. 29,30Using computer-assisted techniques in medical applications can reduce cost, time, human expertise, and medical error. 28unhimangalam et al. reported that by designing an expert system, they were able to diagnose CTS and its severity using fuzzy logic to help the patient take appropriate therapeutic measures before the severity of CTS increases.They believe that the system they developed can help the GP or specialist to diagnose and predict the patient's condition. 28ark et al.The results of the study reported that AdaBoost achieved 99.08% accuracy with the Random Forest Ensemble method, therefore using a smaller dataset provides a performance advantage. 22n our study, the best estimation was SVM and the worst estimation was KNN in the grade zero.Our best guess in grade 1 belongs to SVM.Ensemble and Tree made the best guesses in the 2nd and 3rd grades.SVM is the best algorithm with an overall success rate of 93.55%.As can be understood from the results of the algorithms we used in our study, the data type should be more to increase the success rate of the algorithms.It is possible to talk about some difficulties in using machine learning in electrophysiological measurements.For example, the devices from which we receive the messages are not standardized and the data obtained according to the height, weight, gender and other demographic characteristics of the patients cannot be standardized.Similar limitations are seen in the studies of distinguishing neurologic and psychological diseases in machine learning. 33t should be kept in mind that AI can be used in different methods and in different combinations while diagnosing the disease, and it has different limitations and abilities in every direction. 34lthough it facilitates clinical diagnosis, it is the best used It should be known that even AI algorithms tend to avoid negative side effects and test results, and it should not be overlooked that the safety of the patient cannot be fully ensured. 35

Conclusion
The results of our study showed that the ML algorithm models provided better optimal training and prediction results, consistent with previous studies.Our ML-based classification system was able to accurately predict the severity of CTS using patient baseline, clinical information, and nerve conduction results.We believe that our study can play a supportive role in the clinic, allowing the surgeon or physician to determine the severity of CTS and decide on surgical or medical treatment accordingly, with minimal discomfort to the patient.The use of artificial intelligence can achieve very successful results in proportion to the regular and detailed recording of patient data in the digital system.However, it should be clearly known that; Artificial intelligence usage algorithms without positive findings obtained as a result of the examination by the clinician will always be incomplete in the diagnosis and treatment process.

Figure 1 .
Figure 1.Gender distribution BMI distribution is given in figure 2 below.

Figure 2 .
Figure 2. BMI distribution False NegativeMathematical equations of performance metrics used in the study are given in equations 1, 2, 3, 4 and 5 given below.
80.65%, Tree with 70.97%, and KNN with 64.52%.Besides, the Carpal tunnel syndrome ROC curve graph is shown in Figure 4. Data classification performances of classification algorithms are clearly shown on this graph.

Table 1 .
Dataset The data set is explained in Table1above.Carpal Tunnel Syndrome (CTS) severity data; GRADE 0: 157 pieces of data with zero intensity (normal) GRADE 1: 92 data at an intensity (mild) GRADE 2: 55 pieces of data in two (moderate) GRADE 3: 11 data at three severity (severe)

Table 3 .
Carpal tunnel syndrome performance results of the classification 11) for hands with mild to moderate CTS in controls, in ML-based CTS assessment with predictive accuracy reaching 90.3%.11Yamanetal. compared bagging and boosting ensemble learning methods to automatically classify EMG signals.Their experimental results showed that group classifiers perform better in diagnosing neuromuscular disorders.
32Wei et al. determined that hand kinematics is important for CTS diagnosis and severity grading using Random Forest (