# Unraveling Functional Dysphagia: A Game-Changing Automated Machine-Learning Diagnostic Approach
## 2 Materials and Methods
### Shallow Learners  
We used multiple state-of-the-art shallow learners to achieve our goals, namely SVMs, random forest, K-nearest neighbors (KNN), and logistic regression [49]. Shallow learners, also known as shallow or weak classifiers, are machine learning algorithms that have limited depth or complexity in their decision-making process. * Support vector machine (SVM) is a shallow learning algorithm that separates data into different classes by creating an optimal hyperplane in a high-dimensional space. Linear SVM aims to find a hyperplane that best separates different classes in the input data by maximizing the margin between them. It works well when the data are linearly separable. On the other hand, radial basis function (RBF) SVM uses a non-linear transformation to map data into a higher-dimensional space, where it seeks to find a hyperplane that effectively separates classes even when they are not linearly separable in the original feature space. The RBF kernel computes the similarity between data points using the Gaussian function, enabling it to capture complex relationships. While linear SVM is simpler and more interpretable, RBF SVM is more flexible and can handle intricate patterns in data, making the choice between them dependent on the nature of the problem and the dataset at hand. * Random forest is another shallow learning method that constructs multiple decision trees and combines their predictions to make a final classification. It leverages the concept of ensemble learning to improve accuracy and can handle high-dimensional data. It operates by constructing multiple decision trees during training and combines their predictions to make more accurate and robust predictions. Each decision tree is trained on a different subset of data and employs a randomized selection of features. This randomness helps to reduce overfitting and increases the diversity of the indi  
Figure 2: Transit of the bolus in (**a**) a normal subject and (**b**) a functional dysphagia patient (10 cc, TB). vidual trees, leading to better generalization. During prediction, the random forest aggregates the outputs of these trees to arrive at a final prediction, whether it is a class label in classification or a numerical value in regression. The above approach makes random forest resilient to noise, outliers, and missing values, and it often performs well on a wide range of tasks without requiring extensive hyperparameter tuning. * K-nearest neighbors (KNN) is a simple yet effective shallow learning algorithm that classifies new instances based on the majority vote of its K-nearest neighbors in the feature space. It works by finding the K data points in the training dataset that are closest to a given input point and making predictions based on the majority class (in classification) or the average value (in regression) of these K neighbors. KNN's strength lies in its ability to capture local patterns in the data, which makes it suitable for tasks where data points of similar characteristics tend to have similar outcomes. However, KNN's performance can be sensitive to the choice of the distance metric and the value of K, and it might struggle with high-dimensional or noisy data. Regularization techniques and preprocessing steps like feature scaling can help to improve KNN's performance in various scenarios. * Finally, we utilized logistic regression (LR), another shallow learning algorithm, for our analysis. It operates by modeling the log-odds of the probability of the positive class using a linear combination of input features. The logistic (sigmoid) function is then applied to the linear combination to constrain the output between 0 and 1, representing the probability of the positive class. Model parameters are iteratively optimized through techniques like maximum likelihood estimation, aiming to minimize the log-loss function that quantifies the disparity between predicted probabilities and actual class labels. Regularization techniques such as L1 or L2 regularization can be incorporated to prevent overfitting.