Obstetric Anal Sphincter Injury Detection Using Impedance Spectroscopy with the ONIRY Probe

Anal sphincter injuries occurring during natural deliveries are often a reason for severe complications, including fecal incontinence. Currently, approximately 80% of these injuries remain unrecognized. Therefore, it is crucial to focus on finding a way to diagnose such injuries as early as possible to apply the tailored treatment. This study aimed to assess the accuracy of impedance spectroscopy in the diagnostics of obstetric anal sphincter injuries (OASIs) using a specially designed rectal probe called the ONIRY Probe. The protocol of the clinical trials is described at NCT03769792. Twenty women after natural delivery were enrolled in the study and divided into two groups referring to the stage of a perineal tear (Group A: 1or 2-degrees, and Group B: 3or 4-degrees of a perineal tear; without or with sphincter injury, respectively). The study design included three visits during which a number of diagnostic tests were performed, including impedance spectroscopy, and 3-dimensional endoanal ultrasound, anorectal manometry, and physical examination as a reference. Statistical analysis comprised raw data analysis, as well as post-processing with the Synthetic Minority Oversampling Technique (SMOTE) method, as the output reference grade was highly imbalanced. A variety of machine learning techniques were applied for the OASI classification (≤2 vs. >2), and Wexner scale (=0 vs. >0). The best efficacies were obtained using Random Forest and k-Nearest Neighbors methods. Best accuracies were 93.3% and 99.6%, for raw and re-analyzed data, respectively, for ultrasound assessed by the OASI classification; and 79.8% and 97.0%, respectively, for clinical evaluation using the Wexner scale. Impedance spectroscopy performed using the ONIRY Probe appears to be a promising diagnostic technique for anal sphincter injury detection but requires further investigation (the next phase of the pilot clinical trial is described at NCT04181840).


Introduction
Damage of the anal sphincter can lead to fecal incontinence, a condition seriously impairing the quality of life and interfering with activities in multiple spheres of life [1]. The most common cause of fecal incontinence is anal sphincter injury occurring during natural delivery.
The incidence of obstetric anal sphincter injuries (OASIs) reported in the literature varies between 3% and 20% of women after natural births [2][3][4][5][6][7], and is probably strongly underestimated. Often, the only diagnostic method available is a rectal physical examination, and the diagnosis of OASIs is based on the experience of the examining physician. Meanwhile, ultrasound evidence of OASIs was found in 27-35% of women giving birth for the first time, and in 3-12% at subsequent births [8][9][10].
Endoanal ultrasound remains the gold standard for OASI diagnostics. The images obtained via its 360-degree endoanal probe allow the assessment of external and internal anal sphincter morphology. These images are able to show a break in muscle continuity, and thinning or fibrosis. The examination is characterized by high sensitivity, reaching 100% [11]. Nowadays, 3D ultrasound allows determination of the OASI degree during the immediate postpartum period [12][13][14].
The grade in OASI classification is assessed based on the type of injured tissue and the extent of the injury diagnosed with endoanal ultrasound, as shown in Table 1. A mark of 1 or 2 on the OASI classification means that there was no injury to the anal sphincter muscles, and any result greater than 2 means that anal sphincter injury is present. Table 1. Description of obstetric anal sphincter injury (OASI) classification [15][16][17].

Grade
Type of Injury 1 Perineal skin injury 2 Perineum injury with pelvic floor muscles but without anal sphincter 3 Perineal injury with anal sphincter 3a Damage <50% of the external anal sphincter thickness 3b Damage >50% of the external anal sphincter thickness 3c Damage to both the external and internal anal sphincters 4 Damage to the perineum, anal sphincteric complex (external and internal anal sphincter) and anal epithelium However, endoanal ultrasound requires specialized equipment (rarely available in maternity wards) and highly skilled medical staff with extensive knowledge and experience in detecting injuries arising during delivery. Both significantly limit the use of this diagnostic tool in clinical practice. Because of these limitations, many women leave maternity wards with undetected anal sphincter injuries, which can cause problems with gas or stool incontinence.
Similar limits are applicable for the other diagnostic test, anorectal manometry, which evaluates the function of the sphincter by measuring pressure in the rectum and anal canal. Based on the analysis of the results, it is possible to assess muscle function, and probable cause of the disorder [18]. A disadvantage of manometry is lack of unification for conducting the examination and reporting its results [19], which further limits its diagnostic value. This unification is only now beginning to be determined [20]. Another device that fits to this category is Fecobionics, which imitates defecation; however, further studies are needed to present its clinical performance [21].
Some studies indicate that electromyography (EMG) signals gathered from the sphincter muscles can also assess their functionality [22][23][24]. However, needle electromyography is an invasive technique and is hence not widely used in clinical practice. Other types of this examination, such as high-density EMG, are promising techniques for studying electrophysiological mechanisms but require further investigation [23]. Moreover, this approach does not examine the anatomy of the muscles, only their physiology.
In clinical practice, the methods aforementioned are usually performed in a small subset of patients with the presence of clinical symptoms and, most often, not earlier than a few weeks after the injury occurs. Consequently, the percentage of undiagnosed OASIs reported in the literature reaches 80% [25].
Patients with sphincter rupture require urgent surgical intervention, preferably during 12-24 h to efficiently restore sphincter continuity [7,26]. Therefore, in order to avoid the troublesome effects of sphincter injury, it is very important to detect it as soon as possible. If sphincter insufficiency is caused by damage or stretching of the pudendal nerve (neurogenic damage), with preserved continuity, conservative treatment should be applied. Patients with symptoms of fecal incontinence, whether caused by sphincter injury or neurogenic damage, should undergo intensive treatment [27][28][29][30][31][32]. In case of absence of proper treatment for sphincter trauma detected in the postpartum period, extended reconstructive surgery performed by an experienced colorectal surgeon can be necessary.
As a result of damage to the sphincter muscles, there is also often a problem of gas or stool incontinence. The Wexner scale, presented in Table 2, is used to assess the severity of the problem. The final score in the Wexner scale is determined by summing scores based on the frequency of events such as fixed and fluid stool incontinence, gas incontinence, use of sanitary napkins and lifestyle change. The lowest possible Wexner score is 0, when the patient has no problem with gas or stool incontinence, while the highest possible score is 20, which means complete gas and stool incontinence. For several years, researchers have been looking for other methods for detecting OASIs that are more comfortable and easier to perform and interpret. For example, studies assessing performance of translabial and transperineal ultrasound probes in detecting OASIs have been conducted [34][35][36]. However, these are all methods requiring ability and skills of interpreting the ultrasound images.
One of the most promising methods with a potential to overcome those limits is impedance spectroscopy. Electrical bioimpedance is already identified in many medical domains as a biomarker, e.g., for tomography imaging or body composition analysis [37][38][39][40]. Therefore, it has been used as a physical marker of tissue condition, changing along with parameters such as microscopic structure, hydration, electrolyte concentration, and others [41][42][43][44]. For these reasons, feasibility studies of impedance spectroscopy application for OASI diagnostics have been undertaken [45,46]. As a result, a system called ONIRY has been developed. It comprises the ONIRY Meter, which is an impedance spectrometer, and the ONIRY Probe, designed according to the patent granted already in Poland and Russia [47].
The proof of concept study conducted in 2018 used the Periprobe RU/AAnalis probe (manufactured by BeacMed, Portalbera, Italy), commonly used for electrostimulation and biofeedback applications, which was adapted to the needs of our tests. It only has two electrodes placed on opposite sides of the probe, allowing only for a bipolar electrode configuration. Even with this configuration, the reported method accuracy was 86.4% (with a sensitivity of 83.3% and a specificity of 94.0% between ONIRY and ultrasound) [45,46]. As the next step, the ONIRY Probe was designed, allowing for tetrapolar electrode configuration, and used together with the impedance spectroscopy device (ONIRY Meter) for estimation of resistance, reactance, impedance modules, and phase shifts.
We then conducted a pilot clinical trial, which aimed to assess the performance and safety of the impedance spectroscopy method. The performance of the ONIRY device was evaluated versus the reference methods (used following the current recommendation in case of suspected obstetric injury [7,[48][49][50]), such as physical examination, endoanal ultrasound (e.g., assessment according to OASI classification criteria), and anorectal manometry. The objective of this report is to present results of this study (NCT03769792).

Participants
Twenty women, with a history of natural delivery 6 to 16 weeks prior to enrollment, were enrolled in the study and assigned to either Group A (1st or 2nd degree perineal tear, without sphincter injury recognized at physical examination) or Group B (3rd or 4th degree, with presumed sphincter injury). Originally, the planned number of women was 24 and the size of both groups equal, but eventually 17 women were assigned to Group A and only 3 to Group B. Such imbalance was due to improper initial sphincter injury recognition at the maternity ward (which only further confirms the need to introduce new diagnostic standards). Therefore, 5 patients assigned initially for Group B were transferred to Group A. A summary of baseline characteristics of the study group is given in Tables 3 and 4 (for OASI classification and Wexner scale, respectively). Since anorectal manometry measurements were not used as a reference method for anal sphincter function evaluation for this study, they are presented as part of the study population characteristics only (see also Results below). The same applies to the Strack and Nordeval scales, which are the scales for ultrasonographic classification of anal sphincter damage.
Summarizing, the inclusion criteria were: Healthy volunteers were not accepted-no control group was considered. Table 3. Summary of baseline characteristics of the study group and anorectal manometry measurements broken down by OASI classification (≤2 for Group A and >2 for Group B) [8]. Data are presented as a number of patients (N) or mean ± standard deviation. All patients with a score above 2 in the OASI classification had a lesion scored as 3a, which was converted to 3 for the calculations.  Table 4. Summary of baseline characteristics of the study group and anorectal manometry measurements broken down by Wexner scale [33]. Data are presented as a number of patients (N) or mean ± standard deviation. All patients with a score above 2 in the OASI classification had a lesion scored as 3a, which was converted to 3 for the calculations.

Study Design
All subjects gave their informed consent for inclusion before they participated in the study. The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of the Medical University of Lodz (RNN/321/18/KE).
Every patient was familiarized with the Patient Information regarding participation in the study. Written informed consent was obtained from each participant prior to enrollment in the study.
Three study visits were conducted for each participant. The visit V0 was for participant screening. The visit V1 was conducted on the same day as V0 or up to 7 days after. The visit V2 was conducted up to 21 days after V1.
At V1, the inclusion/exclusion criteria were checked and the medical history with obstetrics and neonatology details were collected. The physical examination, including gynecological and proctological exams, were carried out. The presence of clinical symptoms of fecal incontinence was checked using the Wexner scale (0-20 points in 5 questions, where 0 means complete continence, and 20 means full incontinence). Then, the ONIRY Meter and ONIRY Probe were used to perform the impedance spectroscopy test.
During visit V2, 3-dimensional endoanal ultrasound (to estimate the injury using the OASI classification, which assesses the problem in 4 degrees: 1 and 2 refers to perineal tissues, 3(a, b, and c)-damage extended to sphincter muscles, and 4-extended to both sphincter muscles and rectal mucosa); and high-resolution anorectal manometry as a reference were performed. After obtaining the results of all tests, the final diagnosis was established and treatment options were proposed to the patient.
The study plan and the scope of individual visits are presented in Table 5.

ONIRY Meter and ONIRY Probe
The ONIRY Meter is an impedance spectroscopy device. It allows for measuring bioimpedance of the tissues through the ONIRY Probe. The main parameters measured were impedance module and impedance phase shift. The impedance was established based on Ohm's law. The module can be calculated as the square root of the sum of resistance and capacitance, both squared. The phase shift can be estimated by finding the arc tangent of the ratio between capacitive and resistive components. All are calculated by the device. A block diagram of the version used in the study is shown in Figure 1.
The selection of application and measuring electrodes is made using a set of multiplexers. The application electrodes apply current (generated by a bidirectional current source) with an amplitude of less than 1 mA to the patient's body, while measuring electrodes record the voltage change. The measured signal is amplified and adjusted to meet the specification of the impedance converter. The whole process is controlled by the STM32 microcontroller, which is also responsible for saving the test data to the microSD card. In this study, measurements from each probe position were saved in a separate file. After switching on the device, calibration should be performed by connecting three plugins with test impedance values to the cable connector, parallel connection of resistor, Rp, and resistor Rs in series with capacitor Cs: • Rp = 510 Ω, Rs = 100 Ω, Cs = 10 nF, • Rp = 82 Ω, Rs = 100 Ω, Cs = 32 nF, and • Rp = 500 Ω, Rs = 2.2 kΩ, Cs = 2 nF.
If necessary, it is also possible to calibrate the device during its operation. After a positive calibration result, the investigator connects the probe and can start the measurement by pressing the button on the front panel of the housing. After the measurements, the investigator removes the microSD card from the device and all files from the examination can be uploaded to anelectronic Case Report Form (e-CRF, provided by the CRO of the trial; later versions will have a more automatic process for data transfer). The ONIRY Meter is a battery-powered device, therefore there is no direct risk of electric shock to the patient.
The ONIRY Probe is an elongated, rounded probe, which, when inserted into the body cavity (anal canal), is able to precisely measure the bioimpedance of adjacent tissue that may allow for concluding the presence and location of an injury. It is based on the tetrapolar measurement strategy using 4 silver electrodes, where two of them (outside) are used as application electrodes and the other two (inside) as measuring ones. The probe that was used in this study had only 4 electrodes (targeted at the specific fragment, multiplexers were not active), it was hence necessary for the investigator to manually rotate the probe (for the next pilot study, NCT04181840, the number of electrodes has been increased to 8, and the measurement can be then carried out by automatic switching of electrodes using multiplexers, which eliminates the need to manually rotate the probe). The head being wider than the rest of the body at the end of the probe prevents the probe from accidentally sliding out of the anal canal during the measurement session. It also helps to place the probe so that the electrodes are in the middle of the sphincter muscles. The probe also has a wider handle that provides a comfortable grip for the investigator. There are position markers on the handle that allow the probe to be placed in the desired positions.

Signal amplification
The entire system is expected to allow for an examination shortly after delivery without notable discomfort and with marginal risk for an additional injury as the thin probe can be precisely placed in the tested area, i.e., anal canal. The way in which the test can be performed is illustrated in Figure 2, and the measurement angles of the ONIRY Probe used in the study are presented in Figure 3.

Data Analysis
For each measurement, impedance data were split into 8 groups according to 8 frequency sub-ranges within a 1-100 kHz range (so that each subgroup had the same number of frequencies for which the measurement was performed): • In each group, average, median, and standard deviation of impedance moduli and phase shift, were calculated. Coefficients for 7th-order polynomial and two-term exponential fitting of the whole curves were also estimated. All those features were considered as input parameters for machine learning models. They were separately calculated for each position and for each patient. That approach initially gave 160 results (20 patients times 8 positions of the probe).
Probably, muscle contraction can be treated as a possible noise source in the impedance measurement; however, participants were asked not to perform any active contraction during impedance measurement. Therefore, we did not assess its possible impact.
We decided to evaluate the performance of machine learning binary models using an ultrasound-based OASI classification (≤2 vs. >2, which corresponds to no injury of the anal sphincter muscles vs. the presence of injury of the sphincter muscles) and clinically-based Wexner scale (=0 vs. >0, which corresponds to no problem with any type of incontinence vs. the presence of a problem with stool or gas incontinence). However, as only a small number of participants was ultimately diagnosed with a sphincter injury (grade more than 2 in OASI classification) and as for those women sphincter damage occurred only in the anterior part of the anal canal, "injured" label outputs were marked only on measurements for angles −45, 0, and 45 degrees that corresponded to the part of the sphincter periphery from the side of the birth canal (where the injuries occurred), as shown in Figure 3. The rest were labeled as "non-injured". That approach gave 9 results labeled as injured and 151 labeled as non-injured for OASI classification. For the Wexner scale, it was 24 and 136 respectively for injured and non-injure labels. Therefore, as a parallel "descriptive" branch of the analysis process, we decided to re-analyze the input data (impedance parameters). This would enable us to evaluate the results for the more balanced case. There are several approaches to deal with imbalanced data. As the sample size from the first pilot clinical trial is small, an order of magnitude is consistent with other pilot studies, so we did not take into account up-and down-sampling and chose a more sophisticated approach. The Synthetic Minority Oversampling Technique (SMOTE) method was used for this purpose [53]. Along with original data, which remain in the process, it provides statistically similar results from a smaller subgroup (based on the difference between samples in the group; first, the difference between each feature vector in the group and its nearest neighbor or neighbors is calculated; then, this difference is multiplied by a random number between 0 and 1; and the obtained product is added to the current feature vector, thus obtaining new feature vectors), and neglects some results from the larger subgroup in number depending on the group distribution. Finally, we obtained 175 results for labels of the OASI classification with 36 injured and 139 non-injured results, respectively, and 202 results for the Wexner scale with the distribution of 94 injured and 108 non-injured, respectively. Thanks to this approach we arrived at 21% injured results for the OASI classification and 47% for the Wexner scale.
For both scales (treated as an output for machine learning classification methods), the data were divided for training and test subsets containing 70% and 30% of the whole data, respectively. This process was repeated 10 times with different "seeds" in order to test the machine learning algorithms on different subsets of the data.
During the analysis, various machine learning algorithms were used. The most efficient methods for both OASI classification and Wexner scale were the Random Forest and k-Nearest Neighbors algorithms. Those algorithms were used with different parameters depending on the output (OASI classification and Wexner scale) and datasets (raw data and data based on the SMOTE algorithm). The parameters used for analyzing the raw dataset are presented in Tables 6 and 7, while parameters used for the analysis of the data generated with the SMOTE algorithm are presented in Tables 8 and 9.  For each method and output, collective (after 10 splits into training sets-70% of data and test sets-30% of data, applied to increase the robustness of the results) 2 × 2 confusion matrices were calculated based on the test sets. The effectiveness of each algorithm was assessed by calculating its accuracy, sensitivity, and specificity. The data analysis process is presented in Figure 4.

Collected data from the Pilot Study
Computing features from impedance data  For all analyses, we used Matlab R2019b software (Mathworks, Inc., Natick, MA, USA). All operations based on the generation of random numbers have fixed and saved steps (seed) to maintain the reproducibility of calculations.

Results
The Nyquist plot and the dependence of the impedance module and impedance phase shift on frequency-for 60 results (20 patients times 3 positions: −45, 0, and 45 degrees)are shown in Figures 5 and 6, respectively. Both the impedance values and the shape of the curves for the measurements labeled as injured seem to be different from those for the measurements labeled as non-injured. On this basis, it can be expected that the use of machine learning algorithms to classify these two cases using the calculated features will be characterized by high accuracy.
The summary (including accuracy, sensitivity, and specificity metrics) of the classification (based on the machine learning model with impedance data as inputs) of the OASI classification (≤2 vs. >2) and the Wexner scale (=0 vs. >0), for raw data and the data re-analyzed with the SMOTE algorithm, are summarized in the Tables 10 and 11, respectively.   Table 10. Summary of the classification (based on the machine learning model with impedance data as inputs) of the OASI classification and Wexner scale, based on the raw data (imbalanced and with a low number of samples); k-NN: k-Nearest Neighbors; RF: Random Forests; all metrics (accuracy, sensitivity, and specificity) were calculated from confusion tables gathered during analysis (10-fold hold-out cross-validation). The ROC (Receiver Operating Characteristic) curves for two outputs, OASI classification and Wexner scale, are presented in Figures 7 and 8, respectively. They take into account two considered classification models (k-NN and RF), and two datasets (raw and re-analyzed).  As expected, the sensitivities for raw data are lower (particularly for the Random Forest algorithm and for the Wexner scale), as the raw dataset is imbalanced (there are many more results with non-injured than with injured labels), along with the fact that the raw dataset has a low number of samples (obtained from only 20 patients). In terms of accuracy, the Random Forest algorithm performed better for both OASI classification and Wexner scale, but k-Nearest Neighbors (k-NN) had greater sensitivities in those cases.

Output OASI Classification
Considering the re-analyzed dataset, both machine learning algorithms yielded over 97% accuracy for OASI classification. The sensitivities are significantly larger (which would be crucial for any screening method). The highest specificity was for the Random Forest technique and was equal to 99.8%. It is worth mentioning that each measure of performance was over 99% for the Random Forest method. For the Wexner scale in turn, the highest accuracy and specificity were obtained with the Random Forest method and were equal to 97.0% and 95.3%, respectively. The k-Nearest Neighbors algorithm yielded the highest sensitivities, which were flawless.

Discussion
All examinations performed with the ONIRY system were non-invasive, painless for the patient, and lasted no more than one minute. No adverse events were reported during the study.
The use of the specially designed ONIRY Probe resulted in an increase of measurement sensitivity compared to previous studies [45,46]. The compatibility of our results with the reference ultrasound method, when assessed using the OASI classification, was at the level of about 93% and almost 100%, for the raw and re-analyzed datasets, respectively. Such compliance with the reference ultrasound method (remaining the gold standard in medical practice) allows us to assume that the impedance-based method of detecting anal sphincter injuries has the potential to be widely used in early diagnostics, or even screening in a large population of women giving birth.
Similarly, a combination of k-NN and Random Forest methods allows differentiating between cases without any symptoms, or with some symptoms, reported during clinical evaluation using the Wexner scale.
Sensitivities of over 83% for OASI classification, and over 74% for the Wexner scale, obtained for raw (strongly imbalanced) data already indicate that bioimpedance may be a long-sought marker for linking structural findings and clinical manifestations of the problem. So far, their results have often not been consistent, which is a serious weakness of anal sphincter diagnostics. This makes the ONIRY method a promising tool for assessing anal sphincter condition (this is also indirectly indicated by the increase in sensitivity when analyzing more balanced data). The current results are consistent with both ultrasound and physical examination, which appears to be unique in the diagnosis of sphincter injury and is strongly awaited in clinical practice.
Furthermore, the software application installed inside the ONIRY Meter may get even more robust once further measurements refine its specificity and sensitivity, as long as the retraining process is continuously applied. Thanks to the application, we deal with the biggest problem of obstetric diagnostics, which is the availability of endoanal ultrasound in maternity wards. This excellent, highly sensitive diagnostic tool requires specialized staff for result interpretation, which limits its use in early detection of obstetric injuries. Meanwhile, early diagnosis is crucial for integrating proper treatment. In the case of a sphincter rupture, only the first-day-diagnosis allows its surgical primary repair, which provides the best distant outcome. In addition, minor injuries, those that are functional and recognized immediately, can be treated with the most efficient early rehabilitation. Appropriate obstetric procedures for these cases, such as proper diet and anti-constipation drugs, can be included, helping to avoid deepening the damage.
We decided to only assess performance of the OASI classification and Wexner scale prediction based on impedance data (calculation of the features is based on the measured raw values; nevertheless, the parameter set could be extended for the next measurement phase and future analyses by adding parameters that can be extracted from the impedance diagram, such as resistive plateaus, frequency of Beta dispersion, membrane capacitance, or phase extrema. However, in our opinion, this would need more samples). The relationships between impedance and specific, more detailed, endoanal ultrasonography or anorectal manometry parameters (e.g., resting rectal pressure, and others listed in Table 1) were not evaluated at this stage of clinical development due to the small sample size. However, those results have been recorded and will be taken into account for future studies, when the number of patients (also with a grade of 3 and 4 in the OASI classification) will increase.
Taking into account that injury non-detection rates can reach up to 80% (according to the literature [9,10]), the new tool for injury diagnostics is strongly expected. The ONIRY system seems to be a good alternative to the current algorithm, giving a chance for significant improvement of obstetric injury detection immediately after natural delivery. As the analysis on the re-analyzed dataset showed, with larger and more balanced data used to train the models, it is possible to increase the sensitivity of the method up to nearly 100%, which would eliminate the situation in which women leave the obstetric ward with undiagnosed sphincter muscle injuries.
Additionally, impedance spectrometry can detect not only sphincter structural damage, but also its dysfunction (as the problem of gas and stool incontinence may not only be due to the tearing of the muscle, but also due to its stretching during delivery). Therefore, by assessing the occurrence of the problem by means of impedance spectrometry, it would be possible to immediately start treatment or rehabilitation (e.g., using exercises with biofeedback techniques or functional stimulation). However, it should be noted that the machine learning application was not intended to indicate the causes of sphincter malfunction. The pathology studied-obstetrical anal sphincter injury-may be related to a functional disorder of anal tone end contractility, with only one underlying pathophysiology mechanism, i.e., damage (due to straining) of the vulvar nerve. So far, we have not studied patients with other functional disorders of the anorectal area.
The main limitations of the study are a small study group (however, the order of magnitude is similar to other pilot studies of medical devices) and strongly imbalanced data distribution. Therefore, we decided to use the post-processing (SMOTE) algorithm to enable a parallel branch to be further statistically analyzed. From the definition of the SMOTE method, we assume a larger "re-analyzed" dataset is coherent with the raw dataset. What is also important is that not all observations are synthetic. Those that are statistically depend on the original data. In addition, by using SMOTE, we did not change the distribution of classes out of the level of its occurrence in the population. As the subsequent studies on a larger group of patients are performed, such approach will not be needed. Additionally, research on a larger group (in particular with more patients with injury degrees of 3 and 4 as measured in the OASI classification) will also allow the use of other methods of data analysis, such as neural networks.
According to the experience gained during this study, conclusions were drawn and improvements were made to the test procedure and device prototype: the ONIRY Probe was equipped with more electrodes to enable performing the study without the need to manually rotate the probe; the device software has also been equipped with a module for visualization, and preliminary interpretation of impedance data has been added.
Of course, further research is still needed to evaluate the possibility to prospectively use ONIRY as an early screening tool shortly after a natural delivery.

Conclusions
The accuracy of the ONIRY device (using an impedance spectroscopy method) in comparison to ultrasound results was 93.3% and 99.6%, using the Random Forest method for raw and re-analyzed data, respectively. The convergence of impedance and clinical evaluation was at the level of 79.8% (for raw data) and 97.0% (for re-analyzed data), both using Random Forest technique. The sensitivities were higher when using the k-NN technique in all analyzed cases.
The results of the study shown that the test performed by ONIRY appears to be an accurate and promising technique for the detection of anal sphincter injury. This tool has the potential to become a widely accessible and easy to use diagnostic method, suitable also for screening purposes. Institutional Review Board Statement: All subjects gave their informed consent for inclusion before they participated in the study. The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of the Medical University of Lodz (RNN/321/18/KE).

Informed Consent Statement:
Informed consent was obtained from all subjects involved in the study.
Data Availability Statement: Data sharing is not applicable to this article due to legal and privacy issues.