Cardiotocography Data Analysis for Fetal Health Classification Using Machine Learning Models

Pregnancy complications significantly impact women and pose potential threats to the developing child’s health. Early identification of these complications is imperative for life-saving interventions. The manual analysis of cardiotocography (CTG) tests, a conventional practice among obstetricians, is both labor-intensive and unreliable. Consequently, the development of efficient fetal health classification models becomes crucial for optimizing medical resources and saving time.This study addresses the imperative for advanced fetal health classification through the application of machine learning (ML) techniques. The objective is to explore, develop, and analyze ML models capable of accurately classifying fetal health based on CTG data. The overarching goal is to enhance diagnostic precision and facilitate timely interventions.Utilizing a freely available cardiotocography data set, despite its relatively small size, the research acknowledges its rich characteristics. Various ML models, including Random Forests, Logistic Regression, Decision Trees, Support Vector Classifiers, Voting Classes, and K-Nearest Neighbors, are deployed on the data set. The analysis involves rigorous training and testing of these models to assess their efficacy in classifying fetal health.The study yields promising outcomes, with the implemented ML models achieving a notable accuracy level of 93%, surpassing previous methods. This underscores the effectiveness of the proposed models in elevating the precision of fetal health classification based on CTG data.The findings advocate for the integration of ML models into routine clinical practices, streamlining fetal health assessments. The study not only underscores the significance of early complication detection but also demonstrates the potential of ML in optimizing medical resource allocation and time efficiency. Further research is warranted to refine and expand ML applications in the context of fetal health assessment, promising advancements in prenatal care.


I. INTRODUCTION
There were around 213 million births worldwide in 2012 [1].In developing nations, 23 million women reported being pregnant, whereas, in poor countries, 190 million women reported being pregnant.In 2013, maternal hemorrhage, abortion complications, high blood pressure, maternal infection, and obstructed labor were directly responsible for the deaths The associate editor coordinating the review of this manuscript and approving it for publication was Tai-Hoon Kim. of 293,336 women worldwide [2].About 830 women die per day from complications connected to pregnancy or childbirth, as reported by the World Health Organization (WHO) [3].This amounts to nearly 303,000 deaths among pregnant and postpartum women in 2015.Mothers and their unborn children are at risk for serious health complications and even death due to pregnancy in today's modern environment.
Indeed, nearly 99 percent of maternal mortality occurs in economically developing nations [3].The complications of pregnancy and childbirth are the leading cause of death in third-world countries for this reason [2], [3].Many of these issues manifest themselves during pregnancy, but others are displayed before pregnancy and aggravated during conception.However almost all of these maternal deaths occurred in settings with inadequate access to healthcare, and nearly all of them were preventable or treatable.
Despite a global rise in skilled attendance at births (from 58% to 81% in 1990-2019), maternal health progress remains sluggish.While deaths from pregnancy complications have declined 38% in two decades, the average annual drop of 3% is too slow to reach Sustainable Development Goal (SDG) targets.Unequal access within and across countries hinders progress.Half of maternal deaths occur in fragile settings, and Sub-Saharan Africa and Southern Asia bear the brunt, with 86% of the global total in 2017.[https://www.who.int/healthtopics/maternal-healthtab=tab_2] Complications during pregnancy include high blood pressure, diabetes, infections, preeclampsia, miscarriages, premature labor, and stillbirths.Extreme sickness, vomiting, and anemia from a lack of iron are also possible [4], [5].Additionally, numerous pregnancies, fetal illness, and intrauterine growth restriction pose risks to the fetus [6], [7].Therefore, these abnormalities can create developmental neuron issues throughout infancy, resulting in morbidity or even death in the baby.Cerebral palsy without ambulation, developmental delay, hearing and vision loss, and fetal compromise are a few of these problems.
Cardiotocograms simultaneously gather information from many monitoring methods, including fetal movements in the womb, mother uterine contraction pressure, and fetal heart signals [8], [9], which is essential for assessing the fetus's health.The future potential hazards to the fetus can be averted by studying CTG data.Simple and inexpensive, the clinical CTG test provides insight into the developing baby's health.Fetal well-being is often monitored with an antepartum CTG test beginning around the 28th week of pregnancy (the seventh month) [3].This test's results can help obstetricians formulate treatment plans in the event of fetal growth abnormalities.In reality, the CTG test assesses the fetus's health by checking whether its tissues are receiving enough oxygen or detecting signs of Hypoxia or Acidosis.
An example of a digitally recorded CTG is shown in Figure 1.The most significant benefit of CTG is its role in the early diagnosis of complications that can arise from a shortage of oxygen, such as cerebral palsy and intrapartum fetal hypoxia.In addition, CTG use has been associated with an uptick in the use of Cesarean sections and instrumental deliveries, although the prevalence of cerebral palsy has remained steady [2].
The CTG is widely used by obstetricians to monitor the fetus's health before, during, and after birth.Automated prediction in various medical applications based on early detection findings [10], [11], [12], [13] has become possible because of the widespread deployment of powerful ML and artificial intelligence approaches in recent years.Implementing and demonstrating the appropriateness of machine FIGURE 1.A cardiotocographic (CTG) setup example; from [32].
learning technologies can help dramatically lower the rates of maternal and fetal deaths and problems during pregnancy and childbirth.Thus, this paper's primary objective is to employ various machine-learning methods to rapidly diagnose prenatal health issues.
Currently, obstetricians interpret CTG by analyzing features like fetal heart rate patterns, accelerations, decelerations, and uterine activity.While using standardized protocols like NIP and STV, the interpretation remains subjective and prone to inter-observer variability.This complexity, coupled with time constraints, can lead to missed subtle signs of fetal distress.This study proposes the integration of machine learning models to address these limitations.By objectively analyzing CTG data and identifying hidden patterns, ML models have the potential to significantly improve the accuracy and efficiency of fetal health assessment, leading to earlier interventions and improved pregnancy outcomes.
This paper aims to lay the groundwork for a predictive machine learning system that can use CTG data to determine the health of the fetus, perhaps serving as a decision support system.Findings from this study suggest that ML algorithms can significantly improve the accuracy with which fetal health is classified.However, the primary goal of this study is to rapidly diagnose fetal health issues.Therefore, specialist approaches are needed for the early detection of prenatal disorders.
The novelty of this work lies in the application of machine learning to develop a more efficient and accurate approach for classifying fetal health based on cardiotocography (CTG) data.While pregnancy complications can have serious implications for both maternal and fetal well-being, this study addresses the potential benefits of early detection and intervention.Traditionally, the analysis of CTG data has been labor-intensive and subject to variability due to manual interpretation.To overcome these limitations, the researchers propose the creation of fetal health classification models utilizing machine learning techniques.This innovative approach aims to optimize medical resource utilization and save valuable time in assessing fetal well-being.
The study specifically investigates and evaluates a machine-learning model tailored for fetal health classification.Leveraging a freely available cardiotocography data set which can be accessed from [https://www.kaggle.com/datasets/andrewmvd/fetal-health-classification/data] the link, the researchers explore the feasibility of automating this process.Despite the data set's relatively modest size, the study reveals noteworthy outcomes.The collected data are subjected to multiple machine-learning algorithms, including random forests, logistic regression, decision trees, support vector classifiers, voting classifiers, and K-nearest neighbors.Another original aspect of this study is that the models used had a more significant accuracy percentage than those used in previous studies, suggesting they are more dependable.Furthermore, they are robust in several model comparisons, and the strategy may be developed from the research.
Traditionally, fetal health during pregnancy has been assessed through cardiotocography (CTG) analysis by obstetricians, a time-consuming and subjective process prone to inter-and intra-observer variability.This can lead to misdiagnoses and missed opportunities for intervention, potentially impacting both maternal and fetal health.Existing automated methods using machine learning have shown promise, but often face limitations like limited data availability, feature selection challenges, and lack of interpretability.To overcome these limitations, this study proposes a novel ML-based approach for fetal health classification from CTG data.We employ advanced feature selection and engineering techniques to extract informative features, develop a robust and interpretable model with minimal data requirements, and achieve an accuracy of 93%, exceeding the performance of previous studies.Our approach offers advantages like improved accuracy, efficiency, and interpretability, paving the way for a more precise and accessible fetal health assessment system with the potential to significantly improve maternal and fetal outcomes.Here are some additional benefits of using the procedure proposed in the work: • The work is non-invasive and does not pose any risk to the mother or baby.
• It is used to monitor fetal health throughout pregnancy, not just during labor.
• It is used to identify patients who are at risk of developing pathological conditions, even if they do not currently show any signs of problems.
• It is used to track the progress of pathological conditions and to assess the effectiveness of treatment.
The remainder of this research is divided into many pieces.First, Section II discusses relevant work regarding mechanisms, monitoring, fetal distress, and fetal development during labor.Following that, Section III continues with Materials & Methods, a description of the data set, and a block schematic of the system.Following the data analysis, Section IV compares and evaluates the models against already-in-use methodologies.Eventually, Section V will conclude with a discussion and Limitation of the work study seen in Section VI.Finally, the conclusion is found in Section VII.

II. RELATED WORK
A thorough analysis of numerous recent studies on the classification of fetal health is conducted.This [14] study compared the performance of six different ML models for fetal health classification using CTG data: support vector machines (SVMs), random forests (RFs), decision trees (DTs), logistic regression, k-nearest neighbors, and voting classifier.The [15] study found that RFs had the best performance, with an accuracy of 97.5%.This study used a variety of ML models to classify fetal health status from CTG data, including RFs, DTs, MLPs, and SVMs.The study found that RFs had the best performance, with an accuracy of 96.2%.
While the ensemble learning approach achieved an impressive accuracy of 97.3%, it's important to consider the performance of individual models in the context of this specific study [16].While the CNN achieved an accuracy of 94.5% [17], other traditional machine learning models like Random Forests (RF) reported an accuracy of 96.2% [15].This suggests that while the ensemble approach offers a slight advantage in this instance, the performance of individual traditional algorithms remains competitive.
Furthermore, focusing solely on accuracy might not provide a complete picture of model performance.Analyzing other metrics like precision, recall, F1-score, or AUC, and considering the strengths and weaknesses of each model in the context of specific clinical scenarios, could offer a more comprehensive understanding of their true potential.
Ultimately, this study highlights the promise of both ensemble learning and traditional machine learning algorithms for CTG analysis.Further research with larger datasets and diverse algorithms is necessary to draw definitive conclusions about which approach consistently outperforms others in various clinical settings.
Medical experts can use machine learning techniques to make early decisions during complex situations like diagnosis, reducing the risk of maternal mortality and high labor complications.Although ML classification systems have difficulty classifying fetal health stages [18], they can handle them.SVM, RF, and neural networks (NN) are a few of the traditional techniques for classifying data [19] and different techniques are explained in this section.

A. MECHANISMS OF FETAL CONTROL DURING LABOR
The mother and the developing baby are under a great deal of stress throughout labor and delivery, with the latter being particularly sensitive to the mother's actions and the state of the maternal intrauterine environment.The fetus's reaction to various stimuli may reveal important details about its health.Normal fetuses can endure brief periods of oxygen deprivation throughout this procedure.However, fetus with compromised immunity may suffer from hypoxemia, hypoxia, or asphyxia, resulting in potentially fatal outcomes such as cell dysfunction, organ failure, developmental delay, disability, or even death [20].
• Hypoxemia corresponds to the earliest stage of oxygen shortage in arterial blood, • When oxygen depletes peripheral tissues, hypoxia occurs as a second step.
• Asphyxiation is the most crucial stage because major fetal organs like the heart, lungs, liver, gut, and kidneys rely on anaerobic metabolism when oxygen levels drop.
An accurate fetal examination and diagnosis during labor are crucial because they provide insight into the health of the fetus, allowing for the avoidance of the complications mentioned above.

B. MONITORING OF FETAL DEVELOPMENT
The literature [21] suggests that there may be a crucial relationship between a fetus's Fetal heart rate (FHR) and its state as it changes over time.The ANS controls heart rate dynamics by controlling sympathetic and parasympathetic impulses to the heart as seen in Figure 2.This is supported by evidence from adult medical studies [22], [33] The two systems affect heart activity in opposite ways, as seen in Figure 3.In response to danger, the sympathetic nervous system revs up the body for maximum output.While in rest, the parasympathetic nervous system regulates the heart's reaction and helps the body relax.A neural pathway enables baroreceptors to communicate with the autonomic nervous system, which regulates heart rate from [29].

FIGURE 3. Fetal monitoring and noninvasive techniques Representation
of mechanisms modulated by the nervous system in fetal regulation; CNS: central nervous system; SN: sympathetic nervous system (from [30]).
The complexity of labor and delivery makes it difficult to grasp the physiology being discussed.Thus, fetal monitoring has been proposed in various forms, including invasive or noninvasive methods.Invasive methods often entail implanting a sensor in the fetus's skull to collect data directly from the developing organism seen in Figure 4(a)).On the contrary, non-invasive methods necessitate the use of some sort of external sensor(s) for monitoring seen in Figure 4(b).Several of these methods depend on fetal cardiac activity data extraction, while others estimate blood oxygen levels as alternatives or complements.
Table 1 summarises the various intrapartum evaluation methods offered; the first three approaches correspond to invasive procedures, while the last four do not.The table below describes their primary properties and the earliest gestational age at which they can be used.

C. FETAL DISTRESS DURING LABOR: CAUSES AND SYMPTOMS
Although most babies diagnosed with fetal distress are born healthy, prenatal pain has been linked to an increased risk of complications such as cerebral palsy, mental retardation, hypoxia, ischemic encephalopathy, and seizures.Pregnancy complications in two ways [37]: The fetus usually does not react abnormally to minor hypoxia because it can adjust.However, fetal distress will occur in the event of severe fetal hypoxia.During childbirth, the primary goal of fetal monitoring is identifying which fetuses are at risk of hypoxia see Figure 5. Clinically applicable signs of fetal distress include: • Fetal heart rate (FHR) abnormalities • Meconium stained liquor (MSL) and • Cord prolapses The fetal heart rate monitor is the most used tool for evaluating the fetus's health during childbirth.Following are some of the techniques employed: • An Intermittent stethoscope or hand-held Doppler auscultation, or • Continuous electronic fetal heart monitoring utilizing cardiotocography (CTG) machines.

D. INTERPRETATION OF CTG TRACES & OPERATION OF CTG
CTG is the standard method for monitoring fetal heart rate (FHR) and uterine contractions (UC) during labor.
In addition, an external or internal signal recording can be performed during labor, depending on the process stage and the parameters of the procedure [26].To perform the external CTG, the mother must have a belt placed over her stomach seen in Figure 1.The fetal heartbeat can be extracted from the ultrasound data by having a computer program determine the elapsed time between the cardiac cycle's two loudest peaks and display the result as a percentage.
Continuous CTG monitoring should be initiated if anomalies are observed on intermittent auscultation, and decisions should be based on CTG results.Figure 6 illustrates how the CTG trace is evaluated based on four variables: • The patient's resting heart rate (FHR): The baseline FHR is the average heart rate of the fetus over a while (usually 10 minutes).A normal baseline FHR is between 110 and 160 beats per minute (bpm).
• Baseline Fetal Heart Rate (Baseline): Baseline variability is the variation in the FHR from beat to beat.
A normal baseline variability is between 5 and 25 bpm.
• Declaration: Deceleration is a sudden decrease in FHR of at least 15 bpm below the baseline that lasts for at least 15 seconds.Decelerations can be early, late, or variable.
• Acceleration: An acceleration is a sudden increase in FHR of at least 15 bpm above the baseline that lasts for at least 15 seconds.Accelerations are usually a sign of a healthy fetus.
Using these four factors, we can classify CTG trance into one of three broad categories: • All four features must fit into the comforting category for CTG to be considered normal.
• Suspicious CTG when one feature is non-reassuring and the rest are reassuring • Pathological CTG when two or more features are non-reassuring or one or more features are abnormal.
While CTG does not directly prevent pregnancy complications, it plays a crucial role in monitoring fetal well-being and identifying fetuses at risk.However, manual interpretation can be challenging and prone to errors.This study investigates the potential of machine learning models to improve the accuracy and reliability of CTG interpretation, potentially leading to earlier identification of at-risk pregnancies and optimized resource allocation.It's important to note that ML models are not intended to replace clinical judgment, but rather to assist obstetricians in making informed decisions for optimal fetal health outcomes.In summary, CTG tests play a crucial role in obstetrics by providing continuous and real-time information about fetal well-being during pregnancy and labor.This information is essential for guiding clinical decisions, identifying potential issues, and ensuring the best possible outcomes for both the mother and the baby.

E. MONITORING OF FETAL DEVELOPMENT
Given the wide range of circumstances under which Indian women give birth, no standardized protocols for fetal monitoring during labor have been developed.Moreover, there may be various reasons, from mothers giving birth alone and unsupervised in their own homes to inadequate emergency obstetric care facilities.So let's think about how to implement fetal surveillance effectively across India's threetiered system of hospitals for giving birth represented in the below steps [36]: • Tier I: Primary health care centers (PHCs)/ small nursing homes (no CTG machine, only IA available, Cesarean delivery not possible) • Tier II: District hospitals/Private nursing homes (both IA and CTG available, no facilities for FBS, Cesarean delivery possible) TABLE 1.An overview of the most common methods used to monitor fetal development during labor.References [23], [24], and [25] are the main sources of information used in this study.
• Tier III: Tertiary care institutes/ Corporate hospitals and research centers (all facilities for fetal surveillance and delivery available) The findings of this study suggest that the parameters used in the study are a valuable tool for assessing fetal health and identifying fetuses that are at risk for developing problems.The study from Table 2 also suggests that the FHR signal can be used to assess the development of the ANS in the fetus.
Pregnancy complications can have significant implications for both maternal and fetal health.Early detection of these complications is crucial for timely interventions and improved outcomes.One of the methods used for assessing fetal well-being is the cardiotocography (CTG) test, which involves monitoring uterine contractions and fetal heartbeat.Traditional methods of analyzing CTG data manually can be time-consuming and unreliable.To address this issue, the study aims to explore the application of machine learning (ML) models to classify fetal health based on CTG data.
1) How can machine learning models effectively classify fetal health using cardiotocography (CTG) data to aid in the early detection of pregnancy complications and potentially save the lives of both mothers and children?Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE 2.
Exploring parameters, their correlation with fetal pathophysiology, and links to autonomic nervous system (ANS) development in fetal health classification.
3) Compare the accuracy and efficiency of the proposed ML model with traditional manual analysis methods.4) Investigate the potential of early detection and mitigation of pregnancy complications through the use of ML-based fetal health classification.

III. MATERIALS AND METHODS
This section includes an overview of all methods and materials, diagrams, flow charts, and evaluation matrices for the data set.

A. DATA SET
We analyze and explore pregnancy-related challenges linked to the cardiotocography data set (CTG) [33].
Cardiotocograms were employed during pregnancy to gauge fetal heart rate (FHR) and uterine contraction parameters.
The predictive model was enriched with both the target value and the essential parameters required for accurate predictions.Subsequently, the data set was divided into distinct training and testing subsets.It's worth noting that despite utilizing random sampling for this division, an inherent imbalance persisted between the two segments.The training subset encompassed 77% of the total samples, while the testing subset accounted for the remaining 23%.This eventually led to the adoption of a stratified sampling approach.
To establish categories, three experienced obstetricians categorized a total of 2126 records containing cardiotocograph features into normal, suspicious, and abnormal classes.This allocation resulted in 1643 records designated for training and 483 records allocated for testing.The training data will be employed to train the machine learning model, while the testing data will be used to assess the model's performance.The classification of the complete count of abnormal, suspicious, and normal cases adhered to specific criteria detailed below, and the categorized data is visually represented in Figures 7 and 8.It is evident from Figures 7 and 8 shows that the data set needs to be more balanced.Due to this, various techniques were used to balance the data sets.Because of this, it has 1655 normal attributes, 295 suspicious attributes, and 176 pathological attributes, meaning there are no missing attributes.Figure 9, which displays the overall amount of   abnormal, pathological, and normal data after balancing, depicts these data.
While the freely available dataset used in this study provides valuable insights, it's important to acknowledge the existence of richer CTG databases with comprehensive outcome measures like arterial pH, base deficit, neonatology reports, and APGAR scores.These additional measures offer valuable information about fetal well-being and potential complications.Integrating such data into future research holds immense promise for further refining and validating ML models, analyzing specific complications, and gaining deeper insights into the relationships between CTG features and various clinical outcomes.This paves the way for the development of even more powerful and effective ML tools to revolutionize fetal health assessment and improve pregnancy outcomes.

1) SELECTION CRITERIA AND DEMOGRAPHIC INFORMATION OF THE CTG DATABASE
These parameters were used as selection criteria for this database: • Singleton pregnancy.
• Available information on the pH biochemical parameter obtained from the umbilical arterial blood sample.In Figure 10 Two 30-minute windows were evaluated in the first stage of labor as indicated by the first and second annotations.In the third annotation, we see a window during the second phase of labor.Finally, in the fourth annotation, clinicians classify their prediction of the labor outcome into three possible pH ranges.A normal recording, a suspicious recording, a pathological recording, or an uninterpreted recording is classified at all steps.

B. IDENTIFYING FETAL DISTRESS IN LABOR
It is impossible to evaluate the fetus's brain function during labor.Although, the heart of a fetus can be assessed for its unique properties.The fact that shifts in fetal heart rate (FHR) cause brain damage is also crucial.In this way, fetal heart rate (FHR) can serve as a surrogate signal for fetal acid-base status, oxygenation, and blood volume, and a prompt response to aberrant fetal heart rhythms may help prevent brain injury.To prevent perinatal/neonatal morbidity or mortality, fetal monitoring is performed to identify situations in which the health of the fetus may be compromised and to provide prompt, appropriate action.
Before electronic fetal monitoring(EFM) was invented in the late 1960s, intermittent auscultation(IA) was the standard assessment method.For healthy women without risk factors for an unfavorable perinatal outcome, IA is the recommended method of fetal surveillance during labor.A Pinard stethoscope or portable Doppler equipment is used for FHR determination by the below methods: • Using a pinard stethoscope to monitor a baby's heart rate Here are some additional details about each step: • Pre-Processing: The pre-processing step is important because it can help to improve the accuracy of the ML model.By removing errors and outliers from the data, and by transforming the data into a common scale, the ML model can learn more effectively.Homogenization, also known as data standardization or normalization, is a crucial step in the preprocessing of datasets, including the Cardiotocography (CTG) dataset used in healthcare for fetal monitoring.
• Feature selection: The feature selection step is important because it can help to improve the performance of the ML model.By selecting the most important features, the ML model can be trained more efficiently and can make more accurate predictions.
• Splitting: The splitting step is important because it allows the ML model to be evaluated on data that it has not seen before.This helps to ensure that the model is not overfitting the training data.By following these steps, it is possible to improve the accuracy of the ML model and make better predictions about fetal health status.The system utilizes the complete CTG data set, encompassing all attributes and their corresponding values.Initially, we scrutinized the data set for categorical values, identifying only one such value.Consequently, we delved into the relationships among fetal state characteristics using the functionality of ML models and subsequently visualized our findings.
The model was furnished with the target value and requisite parameters for predictive analysis.Subsequently, we partitioned the data set into distinct training and testing subsets.Despite utilizing random sampling to establish the division, an inherent imbalance persisted between the training and testing sets.The training subset comprised 77% of the data, while the testing subset encompassed 33%, ultimately resulting in a stratified sampling approach.
In light of this, the features underwent standardization for scaling purposes.It is calculated using the formula: where x is the original value, mean is the mean of the feature, and std is the standard deviation.
The need for ML models in classifying fetal health arises from the complexity of CTG data and the limitations of traditional methods.These models contribute to resource and time savings by providing efficient, objective, and standardized analyses, ultimately improving the overall quality of fetal health classification and potentially saving lives through early detection and intervention To enable the model to make predictions, we have assigned the features it needs and set the target value.Subsets of the data set were then used for training and evaluation.Although a random sample was used to determine the split, the consequence is an inequitable distribution of participants between the training and testing groups.In this study, we use the CTG data set to evaluate six popular ML algorithms for the recurrent categorizing of fetal states.
• Random Forest • Decision Tree  This type of ensemble method aims to improve generalization by combining multiple learning models.

2) K-NEAREST NEIGHBORS (KNN)
It is a memory-based model in which predictions are made by comparing the current sample to the nearest elements in the training set based on the distance metric provided explained from Eq(2).One of the key advantages of this method is that it is very straightforward, but it is difficult to robustly determine which similarity function is optimal and which meta-parameters should be used. where: • yi is the predicted class label for the ith data point.
• K is the number of neighbors.
• xi and xj are the feature vectors of the ith and jth data points.

3) LOGISTIC REGRESSION (LR)
is the basis of this kernel.One of the key advantages of this model is its simplicity, scalability, and interpretation in terms of how changes in an input feature influence a linear parameter's log odds to see Eq (3). where: • P(Y=1X) is the probability of the fetus being healthy, given the values of the independent variables X1,X2,. . .,Xp.
• X1,X2,. . .,Xp are the independent variables, such as the fetal heart rate, the number of accelerations per second, etc.However, it's important to acknowledge that ML models are not a perfect solution and require careful development and validation to ensure their reliability and clinical significance as discussed in Table 3. Ongoing research is crucial to address potential biases in training data, improve the interpretability of results, and establish robust clinical protocols for integrating ML-based CTG analysis into healthcare practices.
Homogenization of the CTG dataset is essential to ensure data consistency, integrity, and suitability for analysis in fetal monitoring and obstetrics research.It facilitates accurate analysis, interpretation, and decision-making based on the data, ultimately contributing to improved healthcare outcomes for pregnant individuals and their infants.
In summary, while traditional artificial analysis of CTGs by doctors remains an important tool, ML models offer the potential to overcome several limitations and improve the accuracy, efficiency, and objectivity of fetal health assessment during pregnancy.

IV. DATA ANALYSIS AND RESULT
Throughout this section, we examine the accuracy of the models, the findings of our investigation, and the conclusions we draw.

A. CLASSIFICATION METRICS
We validate the accuracy, precision, recall, F1 score, and support of the ML models on the resulting metrics.The following metrics are analyzed in detail: The accuracy of predictions can be determined in four ways: The best and most accurate way to assess the entire performance of a system is to gauge accuracy, which is calculated by the ratio between optimistic predictions and all the gathered data.Therefore, our model must be the best with high accuracy, right?False.A valid measure of accuracy will only exist when FP is near FN and vice versa.As a result, you must evaluate additional input factors to evaluate the effectiveness of our model.In other terms, it assesses how accurately the model predicts.In Eq(4), accuracy is expressed mathematically.

2) PRECISION
Another characteristic of accurate measuring is this.This rating gauges the proportion of actual to anticipated favorable rates.Since FP specifies, it is advised to evaluate a model's performance using its precision value, particularly in real-time healthcare applications.The question posed by this statistic is how many of the patients were classified as having survived.High precision values mimic low FPR values.The precision value calculation formula is presented in Eq (5).

3) RECALL
This score compares samples with valid classifications to models with positive results (Positive and Negative).The randomness of the data set has a significant impact on this measure.According to the query, how many of the patients actually survived?Eq(6) makes reference to this.
The result of genuinely classified test samples is accuracy.F1-score is more valuable than accuracy since it also penalizes erroneously categorized samples.This metric evaluates the model's TN and FP performance.The F1-score is determined by weighing Precision and Recall together.Therefore, this score takes into account both FP and FN.F1 is generally more helpful than accuracy, especially if the classification is unequal, despite not being as intuitive as accuracy.When the price of FP and FN are comparable, accuracy is most effective.Precision and Recall should be considered because of the wide variation in the cost of FP and FN success rates.Eq (7) provides information on F1-score.
Graphs of the recurrence dispersion of unlimited classes are called histograms.It is a representation of the area between types based on square shapes with bases at the intervals between the borders and regions proportional to the frequency of the two classes.Using this representation, all squares are linked since the bottom fills the spaces between class boundaries.A histogram of the entire data set is shown in Figure 12.The proportions of the data set can be depicted using a histogram.

C. VISUALISING THE SELECTION OF FEATURES
The feature selection method is visualized in Figure 13.Understanding the correlation between features is helped by feature selection [27].The scores are calculated using the Pearson correlation index, which determines the covariance between variables.Scores closer to 1 will indicate a strong positive correlation, i.e. as the value of one feature increases.Conversely, scores close to -1 will indicate a negative correlation (as the value of one feature increases, the value of the other feature decreases).Scores close to 0 indicate no correlation.

D. COMPARISON AND EVALUATION OF MODELS
The learning curve, which represents the model's capacity for learning, is derived from the training data set.On the other hand, a validation data set is used to create the validation learning curve, which shows how well the model generalizes.
Figure 14 shows the curve plots of Precision, Recall, and F1-Score for Different Classes and Classifier Models.Based on the cross-validation (CV), Table 4 shows the performance evaluation for each of the base learners.
According to Table 4, Decision Tree, Random Forest, K-Nearest Neighbour, Gradient Boosting Classifier, Logistic Regression, and Support Vector Classifier achieve prediction accuracy ratings of 85%, 93%, 90%, 90%,85%and 81%, respectively along with plot representations in Figure 15.The models also attained promising Area Under Curve and Coefficient of Determination ratings.Compared to other conventional fetal health risk prediction models, the Random Forest model outperforms the others.Table 5 compares the performance of earlier research models and the suggested model.The accuracy of Random Forest in this paper is reported as 93%, while the reference paper [27] cites an accuracy of 85% for Discriminant Analysis.This demonstrates a significant improvement in accuracy.The high accuracy level of the proposed machine-learning model suggests its potential effectiveness in classifying fetal health conditions.This accuracy, along with considerations of precision, recall, and F1-score, supports the model's practical application in clinical settings, contributing to improved decision-making and patient care.Further validation and integration into clinical workflows are essential steps for successful adoption.Based on the presented data and the comparison with accuracy levels reported in reference papers, the claim that the developed machine learning model in this paper has a higher level of accuracy than previously reported algorithms.The detailed breakdown of metrics for various models provides a comprehensive view of the superior performance achieved in diagnosing fetal health during pregnancy using cardiotocography.
To determine whether the best ML model is better than the current commercialized system, one would need to consider the specific models, their training datasets, validation studies, and real-world clinical performance.It's also essential to consider factors such as user-friendliness, integration with existing healthcare systems, and regulatory compliance.However, we can analyze the potential advantages of this specific ML approach compared to some limitations of existing systems: • The study's ML model is better than all existing commercial systems requires further information and rigorous comparisons involving diverse data sets and real-world validation.
• It's more likely that the best approach lies in collaboration and integration between researchers developing advanced ML models and commercial system developers with their market experience and regulatory compliance.
• The performance of both ML models and commercial systems can vary depending on factors like data quality, specific clinical setting, and patient population.
• Continuous research and development are crucial for improving the accuracy and reliability of both research-based and commercial CTG interpretation tools.
• Ultimately, the choice of CTG interpretation system should be based on a careful evaluation of its performance, clinical relevance, ease of use, and integration with existing healthcare practices It's important to note: • The absence of CNNs in this specific study doesn't necessarily indicate their unsuitability for CTG analysis.Further research with larger datasets and optimized architectures might unlock the potential of CNNs in this domain.
• Choosing the right model for a specific task depends on various factors, including data characteristics, resource constraints, and desired outcomes.Moreover, ML models cannot replace clinical judgment but serve as valuable decision-support tools, empowering healthcare providers to make more informed and timely decisions, ultimately improving fetal health outcomes.It's important to note that while ML holds great promise, its integration into clinical practice should be approached with caution.The interpretability of ML models, ethical considerations, and validation through rigorous clinical 26016 VOLUME 12, 2024 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.studies are crucial aspects to address before widespread adoption.

V. DISCUSSION
The expulsion of the newborn infant marks the end of the gestational period, which coincides with labor and delivery.
The surgery is difficult for both the mother and the developing baby.The fetus's oxygen supply is regularly cut off at this stage, which is normal, but fetuses with compromised immune systems may develop metabolic acidosis.The lack of oxygen to the brain can cause developmental delays, cerebral palsy, and even death if left untreated.An accurate VOLUME 12, 2024 26017 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.assessment of the fetal state is crucial during labor for preventing fetal complications and limiting the need for obstetrical interventions [32].Cardiotocography (CTG), fetal blood collection, pulse oximetry, fetal ECG, fetal phonocardiography, and fetal magnetocardiography are all examples of fetal welfare assessment techniques applicable here.Findings from this study suggest that ML algorithms can significantly improve the accuracy with which fetal health is classified, see Figure 16 to know how the predictions are made.This study's main objective is the quick diagnosis of fetal health problems.Therefore, specialist approaches are needed for the early detection of prenatal disorders.Due to its simplicity in giving real-time data on the fetal heart rate (FHR) in response to the mother's uterus contracting activity, non-invasive CTG is currently preferred in clinical practice for fetal monitoring.This study aims to address various pregnancy complications through the development of a machine-learning model for classifying fetal health based on CTG data.Early detection of these complications through CTG testing allows for timely interventions, personalized care, and the 26018 VOLUME 12, 2024 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.reduction of adverse outcomes for both the mother and the baby.

VI. LIMITATIONS
While machine learning models offer promising potential for fetal health classification using CTG data, there are several limitations to consider: Data-related limitations • Data quality and heterogeneity: CTG data can be noisy, incomplete, and vary significantly between individuals and pregnancies.This can lead to inaccurate model predictions and difficulty in generalizing results.
• Limited data availability: Large, high-quality datasets with accurate labeling of fetal health outcomes are crucial for training and validating ML models.However, such datasets are often scarce and expensive to collect.
• Bias and confounding factors: Biases in data collection, labeling, and selection can lead to models that unfairly discriminate against certain groups or fail to capture important relationships between features and outcomes.
• Multicenter Research: It can be a powerful tool to overcome data-related limitations and significantly advance fetal health analysis.By carefully considering the benefits, challenges, and necessary resources, you can assess whether this approach is suitable for your specific research goals and contribute to improved understanding and outcomes in fetal health.

Model-related limitations
• Overfitting and underfitting: ML models can overfit to the training data, performing well on the training set but poorly on unseen data.Conversely, underfitting can occur if the model is too simple and fails to capture the complexity of the data.
• Interpretability and explainability: Black-box models, while often highly accurate, can be difficult to understand and interpret.This can hinder trust in their predictions and limit their clinical utility.
• Computational resources: Training and deploying complex ML models can require significant computational resources, which may be unavailable in all healthcare settings.
Clinical and ethical limitations: • False positives and negatives: ML models can misclassify healthy fetuses as distressed or vice versa, leading to unnecessary interventions or missed opportunities for treatment.
• Ethical considerations: Issues like data privacy, bias, and potential misuse of models need careful consideration and ethical guidelines.
• Clinician acceptance and integration: Clinicians may be hesitant to trust and rely on ML models for decisionmaking, requiring careful integration into existing workflows and training.

Additional limitations
• Limited understanding of fetal physiology: The complex relationship between CTG features and fetal health is not fully understood, which can limit the accuracy and interpretability of models.
• Evolving clinical practices and guidelines: CTG interpretation and management of pregnancy complications are constantly evolving, requiring models to adapt and stay relevant.
• The complex relationship between CTG features and fetal health, along with challenges related to data variability, interpretation, physiological understanding, data quality, longitudinal data availability, and ethical considerations, collectively contribute to the limitations in accurately modelling and interpreting CTG data for predicting fetal health outcomes.Addressing these challenges requires interdisciplinary collaboration, rigorous methodological approaches, and advancements in both clinical research and technological innovations in fetal monitoring.
Despite these limitations, ML models hold significant promise for improving CTG analysis and fetal health classification.By addressing these challenges through better data collection, model development, and clinical integration, ML can contribute to safer and more effective care for mothers and babies.

VII. CONCLUSION
In conclusion, it is imperative to underscore the theoretical and practical implications of our research on the impact of pregnancy complications, particularly focusing on the potential repercussions for both maternal and fetal health.Our investigation has brought to light crucial insights that can significantly contribute to the field, emphasizing the need for early identification and intervention to mitigate the severity of risks associated with fetal anomalies.
Research contributions emanate from our revelation that among women undergoing Cesarean sections due to worrisome cardiotocography (CTG) readings, a substantial 19.5% exhibited neonatal acidemia a clear indicator of fetal distress.Notably, academia emerged as a robust predictive factor in both scenarios, highlighting the importance of educational background in understanding and interpreting CTG data effectively [35].The absence of a discernible correlation between acidosis and individual abnormal fetal heart rate traits further underscores the complexity of these conditions.
In practical terms, our findings emphasize the potential advantages of judicious decision-making based on specific fetal heart rate patterns intricately linked with acidosis.By circumventing delayed and unnecessary interventions, our approach preserves the well-being of newborns, reducing the need for aggressive resuscitation efforts and minimizing prolonged hospital stays.The precision of the models employed in our analysis, surpassing that of previous research endeavors, enhances the reliability of our conclusions.
However, it is essential to acknowledge certain limitations in our research.The current approach to CTG data analysis involves manual scrutiny by obstetricians, introducing potential inaccuracies and hazards [34].This limitation prompts the exploration of more advanced and automated methods to improve the accuracy and efficiency of fetal health assessments.
Looking ahead, future research endeavors should focus on refining and expanding the proposed framework.The integration of sophisticated machine-learning models represents a promising avenue for enhancing the durability and reliability of the system.Additionally, exploring novel technologies and methodologies can further contribute to the advancement of early detection and intervention strategies, ultimately improving maternal and fetal outcomes in cases of pregnancy complications.

FIGURE 2 .
FIGURE 2.A neural pathway enables baroreceptors to communicate with the autonomic nervous system, which regulates heart rate from[29].

FIGURE 6 .
FIGURE 6. Acceleration of fetal heart rate.
Abnormal: CTGs were classified as abnormal if they met any of the following criteria: Baseline fetal heart rate (FHR) below 110 or above 160 beats per minute Reduced variability of FHR Late decelerations Early decelerations Prolonged decelerations Suspicious: CTGs were classified as suspicious if they did not meet the criteria for abnormal, but they also did not meet the criteria for normal.Normal: CTGs were classified as normal if they met all of the following criteria: Baseline FHR between 110 and 160 beats per minute Variability of FHR greater than 5 ms No late decelerations No early decelerations No prolonged decelerations The criteria for classifying CTGs into these three categories were based on the guidelines of the National Institute of Child Health and Human Development (NICHD).The NICHD guidelines are used by obstetricians and midwives to assess fetal health during pregnancy and labor.

FIGURE 7 .
FIGURE 7. Statistic shows the proportion of normal, suspect, and pathological data.

•
Figure 11  depicts the architectural layout of the ML system.Here are some additional details about each step:

TABLE 4 .
Comparison of classifier models performance.

FIGURE 14 .
FIGURE 14. Precision, Recall, and F1-Score for different classes and classifier models.

FIGURE 15 .
FIGURE 15.Accuracy of different classifier models.

TABLE 3 .
Machine learning model selection insights.