## 2 Materials and Methods
### Transfer Learning-Based Feature Engineering Model  
The ExMPLPQ model combines desirable properties of feature extraction based on exemplar and multiple parameters. LPQ [31], a popular textural feature extractor, was deployed to generate textural features. These were fed to an INCA selector to select the top \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & **Male, \(n\)** & **Female, \(n\)** & **Total, \(n\)** & **Age, Years** &
\begin{tabular}{c} **Number of** \\ **MRI Images, \(n\)** \\ \end{tabular} \\ \hline MS-Axial & 21 & 51 & 72 & 28.4 \(\pm\) 5.66 & 650 \\ MS-Sagittal & 21 & 51 & 72 & 28.4 \(\pm\) 5.66 & 761 \\ Healthy-Axial & 27 * & 30 * & 57 * & 29.5 \(\pm\) 8.32 & 1002 \\ Healthy-Sagittal & 29 * & 20 * & 49 * & 27.4 \(\pm\) 6.48 & 1014 \\ \hline \hline \end{tabular}  
* There is an overlap of subjects in the healthy class, which comprises 29 males and 30 females.  
\end{table} 
Table 1: The attributes of the MRI dataset used. Figure 1: Example axial and sagittal FLAIR MRI sections in healthy and multiple sclerosis (MS) classes. Note the presence of hyperintense lesions in the brain’s white matter in the latter. discriminative features. A kNN classifier [32] was employed for MS vs. non-MS classes (Figure 2). The pseudocode of the proposed method was presented in Algorithm 1. Input: The used MS dataset with 3.427 MRIs. Output: Results. 00: Load MS dataset  
01: **for** k = 1 to 3427 **do**  
02: 1 = MS(k); Image reading from MS dataset  
03: 1 = MS(k); Image reading from 224 \(\times\) 224 sized image  
04: 1 = X(k,1:768) = [lpq(l,3) lpq(l,5) lpq(l,7)]  
05: **for** i = 1 to 224 step by 32 **do**  
06: **for** j = 1 to 224 step by 32 **do**  
07: 1 = res(ii+31,j+31,1)  
08: 1 = X(k, counter * 768+1:(counter+1) * 768) = [lpq(exm,3)  
lpq(exm,5) lpq(exm,7)]  
09: **end for j**  
10: 1 = Extract the 50 th feature vector using the resized images. 11: = Merge the generated feature vectors to create the final feature vector. 13: **end for k**  
14: Apply INCA to generated features. 15: Forward the selected features to kNN classifiers. 16: Obtain predict values  
Figure 2: ExMPLPQ flow diagram. The processing steps of the ExMPLPQ algorithm are described below. _Step 1:_ Read each image from the collected MRI study data subsets. _Step 2:_ Resize each MRI image to 224 pixels \(\times\) 224 pixels. _Step 3:_ Divide each resized image into 49 (=7 \(\times\) 7) 32 \(\times\) 32 sized patches/exemplars. \[\begin{array}{c}Ex_{t}=Im(ii+32\times(i-1),jj+32\times(j-1)),\;i\in\{1,2, \ldots,7\},\;j\in\{1,2,\ldots,7\},\\ \;\;\;\;\;\;\;\;\;\;\;\;\;  
_Step 9:_ Select the best feature vector using the calculated loss values in Step 8.  
\[[mini,idx]=\min(l) \tag{13}\]  
\[final=ftv(:,ind(g)),\ g\in\{1,2,\ldots,idx+99\} \tag{14}\]  
where \(final\) represents the selected best feature vector; \(mini\) are the minimum loss values; and \(idx\), are the indexes of these (minimum) values. In these equations (see Equations (13) and (14)), the index (\(idx\)) of the feature vector with has a maximum classification ratio. In Equation (13), the index of the best feature vector is calculated, and this feature vector (final) is selected using Equation (14). In the last step, classification is performed. _Step 10:_ Classify the chosen final feature vector (\(final\)) by deploying a shallow kNN algorithm, Fine kNN [34], using 10-fold cross-validation. Of note, Fine kNN has been used for loss/misclassification rate calculations during INCA feature selection and binary classification. The hyperparameters were set to k is one; distance function, Spearman; and voting, none. As can be seen from these 10 steps above, the proposed local phase quantization-based MR image classification is a parametric method. The used parameters in this work are tabulated in Table 2.  
As shown in Table 2, our proposed architecture is mimicked by a deep model, but we have used a handcrafted features-based model. We have selected the size of the patch as 32 \(\times\) 32 to extract features from local areas, and we have used an effective feature extractor.