Systematic Optimization of Training and Setting of SVM-Based Microwave Stroke Classification: Numerical Simulations for 10 Port System

The primary objective of this study is to systematically evaluate the performance of the Support Vector Machine (SVM) algorithm, identifying optimal configurations and appropriate parameters for training and testing data, for microwave brain stroke classification. Using experimentally verified 3D numerical models, a large database of synthetic training and test data has been created with different levels of data variability. These models consist of an antenna array surrounding reconfigurable geometrically and dielectrically realistic human head models Within these models, strokes of varying sizes, types, and dielectric parameters are virtually inserted at different positions in brain within the plane of the antennas. Synthetic data sets have been generated to study the impact of reducing training data, data dimensionality, data format, and algorithm settings. The results of this study confirm that Principal Component Analysis (PCA) dimensionality reduction significantly improved the classification accuracy of the SVM algorithm, and datasets of subjects with smaller strokes appeared to be the most suitable for training. Furthermore, datasets that contain the real and imaginary parts of transmission and reflection coefficients result in the highest classification accuracy. For the current antenna array, the best observed setting and scenarios with high variability in training and test data, close to real clinical scenarios, the ability to accurately classify ischemic strokes and suggest safe initiation of thrombotic therapy is approximately 70%.

Abstract-The primary objective of this study is to systematically evaluate the performance of the Support Vector Machine (SVM) algorithm, identifying optimal configurations and appropriate parameters for training and testing data, for microwave brain stroke classification.Using experimentally verified 3D numerical models, a large database of synthetic training and test data has been created with different levels of data variability.These models consist of an antenna array surrounding reconfigurable geometrically and dielectrically realistic human head models Within these models, strokes of varying sizes, types, and dielectric parameters are virtually inserted at different positions in brain within the plane of the antennas.Synthetic data sets have been generated to study the impact of reducing training data, data dimensionality, data format, and algorithm settings.The results of this study confirm that Principal Component Analysis (PCA) dimensionality reduction significantly improved the classification accuracy of the SVM algorithm, and datasets of subjects with smaller strokes appeared to be the most suitable for training.Furthermore, datasets that contain the real and imaginary parts of transmission and reflection coefficients result in the highest classification accuracy.For the current antenna array, the best observed setting and scenarios with high variability in training and test data, close to real clinical scenarios, the ability to accurately classify ischemic strokes and suggest safe initiation of thrombotic therapy is approximately 70%.Index Terms-SVM, brain stroke diagnostics, microwave, numerical model.

I. INTRODUCTION
S TROKE is a life-threatening condition which affects 15 million people worldwide each year [1].There are two main stroke types: hemorrhagic (hStroke) and ischemic (iStroke), both show remarkably similar symptoms.The adverse impact on patients significantly escalates with delayed treatment initiation, and misdiagnosis can be fatal.Ischemic strokes constitute approximately 85% of cases [3] and an efficacious anticoagulation treatment exists for this type, suitable for direct administration in emergency vehicles.Conventional stroke diagnostic methods like computed tomography (CT) and magnetic resonance imaging (MRI) lack suitability for ambulances due to their robustness, prompting a need for alternatives.Microwave (MW) technology could enable the development of an affordable, noninvasive, compact, lightweight, and thus portable diagnostic system.This system has the ability to speed up stroke diagnosis, potentially saving lives and improving the quality of life of stroke patients.[2], [3].
The first option for diagnosing stroke disease involves quantifying changes in dielectric properties within the head using inverse and iterative algorithms [4], [5], [6], often complemented by multi-frequency data [7], processing in the time domain [8] or by combining several algorithms [9], [10], [11].The results of this approach are tomographic images, which are most often designed for monitoring patients at the bedside rather than for rapid field diagnostics in ambulance vehicles.
The second option includes utilizing machine learning techniques to perform stroke type classification, devoid of image outcomes.In supervised machine learning [12], [13], algorithms are trained using data from known scenarios.Obtaining measured data for the early stages of stroke in patients facing life-threatening conditions is inherently challenging.Numerical simulations provide a suitable approach to obtain sufficient surrogate data in such cases.In [14], [15], a single human head model was used to investigate the ability of a machine learning-based classification algorithm to distinguish healthy individuals from subjects with intracranial hemorrhage.In [16], machine learning classification between ischemic and hemorrhagic patients was proposed for 3D numerical data.By deriving a linear scattering operator mapping the dielectric contrast space to the scattering parameter space, the authors adeptly generated an extensive training dataset.Classification using SVM algorithm with Inverse Fast Fourier Transformation (iFFT) for the transformation of the S-matrix from the frequency domain to the time domain was used in [8].The classification was only between the ischemic stroke and hemorrhagic stroke classes, the healthy patients class was not included.Neural networks and data in the time domain can be used for stroke classification as presented in [17].Leading advancements of microwave system development for prehospital stroke classification is the Strokefinder [18].Strokefinder primarily identifies intracranial hemorrhage, but the ability to identify ischemic stroke has also been demonstrated [3].In [19], [20], the authors presented over 90% accuracy in the classification and location of bleeding types, but the classification of ischemic strokes was not subject of this study.The classification of ischemic strokes is more challenging due to the lower contrast of dielectric properties compared to blood [21] and the localization deeper in the head compared to intracranial hemorrhage.
The CTU FBME research team has been studying the detection of strokes through microwave tomography, data classification, and radar detection for several years.In [22], we demonstrated the MW system's potential for brain stroke classification with a laboratory prototype using a homogeneous head phantom.In [23], [24] we showcased the SVM's high accuracy in stroke detection, even with limited training data, and its ability to distinguish between ischemic and hemorrhagic strokes.In [25], various machine learning algorithms were compared, with SVM identified as particularly suitable for this application.In [26], we employed SVM for stroke type classification using a dataset from simplified 2D numerical simulations.In [27], modifying the numerical model by introducing a medium in front of antennas, while maintaining air separation, increased principal component variability but did not significantly enhance classification accuracy.
The objective of this study is to systematically assess the capabilities of the SVM algorithm in microwave-based stroke detection and classification within prehospital care.Our investigation will explore the effects of reducing the number of training data, diminishing the dimensionality of the data, and selecting an appropriate configuration for the algorithm.

II. METHODS AND PROCEDURES
A full-wave numerical simulator COMSOL Multiphysics version 6.1 [28] has been used to derive synthetic data (called scattering parameters or S-parameters) from the antenna array which have been used to generate both training and test data.The experimental system has been used to verify both the 3D numerical model used of the antenna array and to obtain a realistic noise level in the experimental data.A corresponding additive white Gaussian noise has been added to the synthetic data to increase its realism.

A. Numerical Model
The antenna array consists of 10 antennas described in [29] and surrounds the patient's head (see Fig. 1).The working frequency has been set to f = 1 GHz.The choice of the 1 GHz frequency follows from [30], [31] and our previous studies [23], [26], where the classification for multifrequency data was mainly tested in [26] and did not yield significant improvement in the results.As the number of data increased, even with dimension reduction, the success rate of the algorithm decreased.Absorption boundary conditions were applied to the outer surface of the computational domain.The maximum value of the side length  of the discretization grid tetrahedron has been set to 1/8 of the wavelength of the plane EM wave in the given environment and for the selected operating frequency.
The 3D geometries of the models of all 10 human heads are based on models from the IT'IS Foundation's "The Population Head Model V1.0" database [32].In Materialise 3-matic version 17.0, the computational mesh of the models was repaired and imported in COMSOL Multiphysics.Models contain layers (domains) representing the scalp, skull, cerebrospinal fluid, and brain (white matter and grey matter).
The individual meshed domains of a head phantom are shown in Fig. 2.
Realistic values of dielectric properties have been assigned to the individual domains of the human head models, representing different biological tissues.These values have been calculated using the frequency-dependent 4-pole Cole-Cole model.The numerical model of ischemic stroke represents a 15% reduction in the dielectric parameters of the surrounding brain tissue [21], while the dielectric parameters of hemorrhagic stroke have been set to be equivalent to blood.We utilize the dielectric properties of a phantom human head as a matching medium, as specified by the IEEE standard [33].The values used for the dielectric properties of the individual domains at 1 GHz are shown in Table I.
The spherical stroke models have been positioned within the plane of the antennas.Fig. 3 shows the centers of the fixed stroke locations for the spherical models.These locations have been chosen to place the stroke model only in the brain domain for strokes with diameters between 20 and 40 mm.To generate the test data, the strokes have been randomly placed within the brain domain in the antenna plane.

B. Calculation of S-Parameters
The COMSOL Multiphysics simulations have been controlled with in-house written MATLAB scripts.These specifically set the operating frequency, stroke type, size and position, head models size scaling, and save the resulting S-matrices together with the numerical model settings to a MATLAB structure matrix file.Three datasets have been generated.Datasets are summarized in Table II.One numerical full-wave simulation (one frequency and 10 antennas) typically takes 3 hours.We used in total five workstations equipped with two 2.1 GHz Intel Xeon Silver 4208 octa-core processors and 192 GB of RAM to acquire large data sets.
To increase data variability, noise has been added to ischemic stroke (iStroke) and hemorrhagic stroke (hStroke) data, unlike in [26].We used additive white Gaussian noise at the level −85 dB, which corresponds to the noise in the experimental measurements described in the following chapter.The considered 10 head models allow to generate only 10 "noStroke" S-matrices for training and testing the algorithm.Thus, the number of "noStroke" data has been extended by repeatedly inserting random noise into 10 simulated S-matrices, which therefore corresponds to repeated measurements of patients.

C. Experimental Validation of the Numerical Model and Noise Level Estimation
An experimental microwave system has been designed and manufactured to verify the 3D numerical model.The system is described further in [22].It consists of 10 patch antenna elements fully described in [29], a 3D printed antenna holder serving also as a container for matching liquid, measurement HW -vector network analyzer (VNA) ZNB8 and switching matrix ZN-Z84, both Rohde & Schwarz (Germany).
For the experimental validation of the 3D model, the inner part of the container was filled with a matching medium.Equivalently, the numerical model of the MW system was virtually filled with the matching medium and the head phantom was removed.This allows us an idealized comparison of the results of the 3D simulation and measurement.The matching medium consists of a mixture of water, salt, and isopropanol [34].The matching medium mimics the properties of the average brain.
Microwave measurements have been performed utilizing an in-house written MATLAB script to control the VNA connected to the switching matrix.Before measurement, a full-port calibration has been performed using an automatic calibration unit ZN-Z153 (Rohde & Schwarz).The measurements have been performed at a frequency of f = 1 GHz with an inter-frequency bandwidth of 10 Hz and an output power of 10 dBm.
The numerical model validation has been carried out by direct comparison of the calculated and measured S-parameters at f = 1 GHz.
Repeated measurements have been conducted to monitor and assess the noise level.The microwave measurements were carried out continuously for a duration of 7 hours, with approximately one measurement taken every hour.During each hour, a set of three measurements has been performed, each measurement spaced apart by a time interval of 10 minutes.This process resulted in a total of 21 measurements throughout the duration of the experiment.
White noise ranging from −100 to −60 dB (with a step of 1 dB) was systematically added to the S-matrix obtained through numerical simulation using a MATLAB function awgn that supports complex numbers and adds complex noise.We calculated the mean squared error (MSE) between repeated measurements and synthetic data with various levels of added noise.

D. Data Analysis
The agreement of the measured and simulated S-parameters has been analyzed using relative magnitude differences defined Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply. as where S A ij and S B ij denote the scattering parameters for each pair of antennas (i, j) for measurement and simulation respectively.
Due to the Lorentz principle of reciprocity, our 10-antenna system exhibits 55 independent complex-valued elements in the S-matrix.110 observed features can be formulated as real and imaginary or as modulus and phase of independent S-matrix elements.
The training and test data have been normalized to ensure a mean of 0 and scaled to achieve a standard deviation of 1.For training data, the principal component coefficients have been computed using Principal Component Analysis (PCA) through Singular Value Decomposition (SVD).We compare the variance of the principal components for data in the real-and imaginarypart format (ReIm) versus data in the module and phase format (MoPh).
The principal component coefficient has been used to reduce the dimensionality of the training and test data.The most appropriate number of data dimensions (i.e., of PCA-extracted features) has been chosen based on the classification accuracy for different dimensions.Classification accuracy was observed from a minimum number of five dimensions, with a step of five to a maximum number of dimensions.

E. Stroke Classification
A multiclass classifier of ischemic stroke (iStroke), hemorrhagic stroke (hStroke), and no stroke (noStroke) classes was constructed by combining multiple binary classifiers [26].To enhance the algorithm performance, we sought optimal settings for the SVM by tuning its hyperparameters.The optimization process was performed using Bayesian optimization and 500 iterations over all hyperparameters.Training and test data consisted of a predefined number of rows, in which each row was filled with normalized and dimensionally reduced values from the S-matrix.
A reliable classification of ischemic stroke is sufficient for the application of thrombotic therapy to dissolve a blood clot.For the detection of ischemic strokes, we used a SVM classifier which classifies into the iStroke and others (hStroke, noStroke) classes.However, the initiation of thrombotic therapy could have life-threatening consequences [22], especially in the scenario where the patient with hStroke is misclassified in the noStroke class.In case of such misclassifications, the SVM algorithm is set to 100% sensitivity for the classification of the iStroke scenario, and the classification accuracy will be monitored.
The classification accuracy (CL-accuracy), cross-validation error (CV-error) and Cohen's kappa value (Kappa) were calculated.A confusion matrix was used to determine which stroke type was problematic for classification.

F. Algorithm Testing
The key conclusions from previous research on 2D numerical simulations presented in [26] must first be confirmed for 3D simulation datasets.We tested whether an SVM trained on high variability 3D simulation data from subjects with smallest strokes will be able to generalize and accurately classify larger stroke size.
The classification accuracy could depend on the choice of a suitable dataset format.The S-parameters, as well as any other complex numbers, can be expressed in a Cartesian complex plane (real and imaginary parts presented separately) or in a Polar complex plane by modules and phases (argument).Despite its importance, the format of training data is not given sufficient attention in the literature.Therefore, we tested whether a SVM algorithm trained on data in real and imaginary part format will show higher classification accuracy than in module and phase format.
Considering that approximately 85% of strokes are ischemic [3], it is essential to definitively diagnose ischemic strokes to initiate thrombotic therapy safely.First, we tested whether the accuracy of an SVM classification of strokes will exceed 85% when classifying randomly sized strokes at random positions.Second, we tested whether the SVM algorithm can reliably classify ischemic strokes, enabling safe initiation of thrombotic therapy.

III. RESULTS
The 3D numerical models of a 10-antenna array situated around anatomically, and dielectrically realistic 5-layer models of human heads were created in COMSOL Multiphysics.The head models are shown in Appendix A. The head models were used to obtain an extensive dataset that can be downloaded here: https://forms.gle/K2WPhfsXgTmgJCnh6

A. Model Validation
The numerical model has been validated by directly comparing measured S-parameters from the laboratory prototype of the microwave system and S-parameters outputted by the 3D numerical simulations (Fig. 4).

B. Noise Level Extraction
The maximum noise level in the experimental data has been extracted from repeated experimental measurements.In Fig. 5 the maximum absolute value of the relative magnitude differences between the first and all other measured S-matrixes is Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.shown.Fig. 6 compares the mean squared error for the experimental measurements with noise added to the simulations.

C. PCA
During PCA analysis, we examined the variances of the principal components for two different data formats (see Fig. 7), and we visualized the first three principal components in the 3D space in Fig. 8.

D. Stroke Classification
To verify the generalization ability of the SVM algorithm we trained the SVM classifier on data for the smallest stroke size (20 mm in diameter from dataset 3D_1) and tried to classify larger sizes (30 mm and 40 mm in diameter form dataset 3D_1).To find the appropriate number of dimensions, we gradually reduced the dimensions using PCA.Fig. 9 shows, that for data  in the real and imaginary format, the classification accuracy is already higher than for data in the module and phase format.
The SVM algorithm at 40 dimensions for the ReIm data format achieved 100% classification accuracy, thereby confirmed the ability to classify larger stroke sizes while training on smaller strokes.
The SVM algorithm can classify randomly sized strokes at random positions with 86.3% classification accuracy (see Table III).Dataset 3D_2 for training and Dataset 3D_3 for testing were used.Confusion matrix depicted in Fig. 10 reveals misclassifications.
The SVM algorithm demonstrates the ability to distinguish the presence of patients with ischemic stroke (class "iStroke") patients from healthy individuals or those with bleeding (class "Other") with an accuracy of 86.7 % (see Table IV).Dataset 3D_2 for training and Dataset 3D_3 for testing were used.However, the confusion matrix in Fig. 11 shows that there are misclassifications of the "Other" class as "iStroke".Misclassification analysis revealed that only "noStroke" scenarios are misclassified into the "Other" class, which is acceptable.This indicates that the SVM algorithm can reliably classify about 68% of patients with ischemic stroke.IV.DISCUSSION In our study, misclassifications occurred when classifying into three classes and when the data exhibit a higher degree of variability that is closer to natural scenarios (due to, e.g., noise, different shape and sizes of human heads, different stroke sizes, etc.).However, even for the maximum variability of the data, the algorithm showed high precision in distinguishing ischemic strokes from others with no misclassifications from hStrokes to iStrokes.Based on such accuracy it was able to safely recommend initiation of thrombotic therapy in approximately 70% of patients with iStrokes.
In this study, 10 3D models of human heads based on anatomical scans of 10 different real subjects were used.Stroke models were virtually inserted into these models and datasets were obtained by performing the corresponding full-wave simulations and addition of experimentally determined level of AWGN.In [15], the different head models were obtained by scaling the dimensions of a single CAD model.And the datasets were generated by full-wave simulations.In [16], 10 different head models were generated by modifying the tissue boundaries within one CAD model and incorporating the assumed variability of the dielectric parameters of biological tissues.The datasets with different strokes were created using a new original and effective technique employing a linear scattering operator.A limitation of our study is the embedding of the stroke models only in the plane of the antennas and the dielectric properties of the considered head tissues were set to nominal values, unlike [16].
In [15] was demonstrated that the presence of noise adversely impacts the outcomes of classification.Therefore, in our study, unlike in [26], the realism of the synthetic data was further improved by adding the white Gaussian noise of the experimentally determined level.The noise level was determined by calculating the mean squared error (MSE) between repeated measurement and synthetic data with added noise of different levels.The highest agreement in MSE was observed for a noise level of −88 dB.In order to incorporate noise into the simulated data, −85 dB, was finally chosen.The authors in [16] used noise information from the vector analyzer datasheet.Unlike this study, absorbers and shielding around the antenna array were not used in our measurement setup, again leading to a higher degree of realism in our study.
PCA was used for the reduction of the dimensionality and the analysis of the variance of the data in the real and imaginary components format versus the data in the module and phase format.Most papers dealing with stroke classification do not explicitly mention the data format used.As shown in Fig. 7, the variance graph for the individual principal components is higher for the module and phase format compared to the real and imaginary component format.This suggests that the use of module and phase data may increase the variance of the data, which has the potential to improve the performance of the classifier.
Furthermore, we plotted the first three principal components, that are the components with the highest variance, to obtain the arrangement of data in the 3D space in Fig. 8.For the data represented in the format of the real and imaginary parts of S -parameters, the plotted points exhibited well-defined clusters that enabled better separation of iStroke, hStroke, and noStroke data compared to the data in the modulus and phase format, where the points appeared to be more blended together.These results suggest that the use of data in the real and imaginary part format may be more suitable for the classification algorithm.
We confirmed that the SVM algorithm could be trained using data for strokes of minimum 20 mm in diameter and then successfully classify larger strokes on same positions.This generalization capability was previously demonstrated in 2D numerical datasets [26], and is now verified in 3D numerical data sets.The real and imaginary part format provided the highest classification accuracy compared to the module and phase format despite the fact that the module and phase data showed a slightly higher variance of principal components compared to the real and imaginary parts.On the other hand, our classification result corresponds to the distribution of the first three principal components where the points in the modulus and phase format appear to be more blended together then the real and imaginary part formats.
The results in and Table III show that the 3-class SVM algorithm achieves a classification accuracy of 86.3%.However, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.from Fig. 10, it can be observed that clinically unacceptable misclassifications occurred when hStroke was classified as iStroke.
The results in Table IV show that the 2-class SVM algorithm achieves a classification accuracy of 86.7%.Fig. 11 shows 4% misclassifications, but only noStroke scenarios were found and thus there is no clinically unacceptable misclassification of hStroke as iStroke.Fig. 11 shows that for 68% of patients with ischemic stroke, it will be possible to suggest the safe initiation of thrombotic therapy.When compared to Strokefinder, the device classified only 65% of iStroke patients [3].A high classification accuracy (98%) was achieved in [9] for stroke type classification in a tomographic image.However, more detailed information, such as the confusion matrix, is missing for comparison.In [17], unlike in this study, classification using a convolutional neural network in the time domain was chosen, but the overall classification accuracy for simulation data with added noise was 81.7%, which is comparable to our results.

V. CONCLUSION
This work systematically investigated the potential of SVM for the microwave classification of strokes using synthetic yet realistic scenarios.For this purpose, 3D numerical models were created and experimentally verified.Using the corresponding simulations, large datasets were calculated to train and test the SVM classification algorithm.
The numerical models consisted of a microwave antenna array surrounding an anatomically and dielectrically realistic human head model with adjustable geometry.Varied factors, such as stroke size, position, head model type, and experimentally determined white Gaussian noise, enhanced data variability and realism.The SVM algorithm effectively detected and classified strokes as ischemic or hemorrhagic.
It was confirmed that PCA dimensionality reduction significantly improved the classification results.The results also showed higher classification success for the datasets given in real and imaginary part format, compared to datasets in module and phase.
Furthermore, it was shown that the datasets of subjects with smaller strokes (20 mm in diameter) appear to be the most suitable for training accurate SVM predictors with high generalization capabilities for large strokes (up to 40 mm in diameter).Overall, the study indicates that in the case of natural variability in the data, accurate detection and classification of stroke will be challenging.
However, our SVM algorithm has demonstrated the ability to accurately classify ischemic strokes and suggest safe initiation of thrombotic therapy in approximately 70% of patients with ischemic stroke.Other patients (noStroke and hStroke) with symptoms must still be transported to the hospital as before.Given that ischemic stroke accounts for approximately 85% of all stroke cases, it can be said that if the system showed the same classification accuracy in practice, almost 60% of stroke patients could be treated before being transferred to a hospital.Therefore, in absolute terms, the impact of strokes could be reduced by up to 9 million patients worldwide each year.Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

Fig. 1 .
Fig. 1. 3D numerical model of an experimental microwave system with 10 antennas surrounding the patient's head, where (a) is the complete model with the plastic container that forms the antenna holder and (b) is a visualization of the arrangement of the antennas around the head.

Fig. 3 .
Fig. 3. Brain tissue model with red-marked (a) 7 and (b) 20 centers of positions where the spherical stroke phantoms were virtually placed to ensure the placement of the stroke model solely within the brain domain.

Fig. 4 .
Fig. 4. Magnitudes differences Δ i,j of the 3D numerical model and the experimental measurement.

Fig. 5 .
Fig. 5.The maximum noise level in repeated experimental measurements.

Fig. 6 .
Fig. 6.Mean squared error between repeated measurements and simulations with various levels of added noise.

Fig. 7 .
Fig. 7.The variances of the principal components for 3D numerical simulation.Two different data formats were taken into account: the real and imaginary part (ReIm) and the module and phase (MoPh).

Fig. 8 .Fig. 9 .
Fig. 8. Visualization of the first three principal components (PCs) in threedimensional space is presented for both the real and imaginary component data formats (a), as well as for the module and phase data formats (b) for 3D numerical data.

Fig. 12 .
Fig. 12.Ten different 3D models of human heads based on real subjects.Models include layers of the scalp, skull, cerebrospinal fluid (CSF), and brain.
Systematic Optimization of Training and Setting of SVM-Based Microwave Stroke Classification: Numerical Simulations for 10 Port System Tomas Pokorny , David Vrba , Member, IEEE, Ondrej Fiser , Member, IEEE, Marco Salucci , Senior Member, IEEE, and Jan Vrba

TABLE I DIELECTRIC
PROPERTIES OF THE DOMAIN IN HUMAN HEAD MODELS AT FREQUENCY 1 GHZ

TABLE III RESULTS
OF 3-CLASS SVM FOR CLASSIFYING RANDOMLY SIZED STROKES AT RANDOM POSITIONS