{'fraction_non_alphanumeric': 0.02943409247757074, 'fraction_numerical': 0.012732919254658385, 'mean_word_length': 4.838235294117647, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Machine learning in the prediction of cardiac epicardial and mediastinal fat volumes

We propose a methodology to predict the cardiac epicardial and mediastinal fat volumes in computed tomography images using regression algorithms. The obtained results indicate that it is feasible to predict these fats with a high degree of correlation, thus alleviating the requirement for manual or automatic segmentation of both fat volumes. Instead, segmenting just one of them suffices, while the volume of the other may be predicted fairly precisely. The correlation coefficient obtained by the Rotation Forest algorithm using MLP Regressor for predicting the mediastinal fat based on the epicardial fat was 0.9876, with a relative absolute error of 14.4% and a root relative squared error of 15.7%. The best correlation coefficient obtained in the prediction of the epicardial fat based on the mediastinal was 0.9683 with a relative absolute error of 19.6% and a relative squared error of 24.9%. Moreover, we analysed the feasibility of using linear regressors, which provide an intuitive interpretation of the underlying approximations. In this case, the obtained correlation coefficient was 0.9534 for predicting the mediastinal fat based on the epicardial, with a relative absolute error of 31.6% and a root relative squared error of 30.1%. On the prediction of the epicardial fat based on the mediastinal fat, the correlation coefficient was 0.8531, with a relative absolute error of 50.43% and a root relative squared error of 52.06%. In summary, it is possible to speed up general medical analyses and some segmentation and quantification methods that are currently employed in the state-of-the-art by using this prediction approach, which consequently reduces costs and therefore enables preventive treatments that may lead to a reduction of health problems.


Introduction
Medical diagnosis support systems speed up the tedious and meticulous analysis done by physicians or technicians on medical data. In many cases, a huge amount of data has to be analysed and, therefore, the diagnosis or the support data may lack precision and suffer noticeable inter and/or intra-observer variation.
Cardiac epicardial and mediastinal fats are correlated to several cardiovascular risk factors [1]. At present, three techniques (i.e., modalities) appear suitable for the quantification of these adipose tissues, namely Magnetic Resonance Imaging (MRI), Echocardiography and Computed Tomography (CT). Computed tomography provides a more accurate evaluation of fat tissues due to its higher spatial resolution when compared to ultrasound and MRI. In addition, CT is also widely used for computing the coronary calcium score.
In this work, we propose and analyse different methods for predicting the amount of epicardial fat based on the mediastinal fat and vice-versa. This is important mainly to speed up the process of their segmentation, regardless of being a manual or automatic segmentation. In our previous work [1], these two fats were automatically segmented in approximately 1.8 h (in volumes of 50 images on average). If the segmentation of one of these fats is known a priori, the volume of the other fat can be predicted in real time. This implies that a patient scan can be processed in approximately half of the computing time. This work is organized as follows: Section 2 presents an overview of the state-of-the-art, further reinforcing the clinical significance of estimating these two fat volumes. In Section 3, the methodology and data used in this work are introduced and discussed. Section 4 contains the performed experiments, comparisons and overall analyses. Finally, in the last section, the conclusions of this work are summarized and avenues for future research are suggested.

Literature review
The human heart ( Fig. 1) is enclosed in the pericardium, a fibroserous sac comprising three concentric layers [1]. The outermost layer is a densely fibrous, tough and inelastic structure (fibrous pericardium). Inside the fibrous pericardium is the serous pericardium, which consists of two layers. The outer of these layers (which is firmly applied to the inner surface of the fibrous pericardium) is termed parietal layer. This layer is reflected around the roots of the major vessels to become continuous with the visceral layer (epicardium), which covers the internal surface of the heart and is firmly applied to it [2].
Two distinct types of fat are closely associated to the human heart, namely the epicardial and mediastinal fats. They are separated by the epicardium layer. In a sense, the epicardial fat is the fat located within the cardiac sac (pericardium), while the mediastinal is the fat that lays on the outer surface of the heart, within the mediastinum. Some authors refer to it as pericardial fat, and indeed there exists a slight divergence in the nomenclature on this matter, as previous discussed in [1].
Some studies [3,4] associate the amount of epicardial adipose tissue with the progression of coronary artery calcification. Schlett et al. [5], for instance, found that the epicardial fat volume is nearly twice as high in patients with high-risk coronary lesions as compared to those without coronary artery calcification. Several studies also correlate other cardiovascular risk factors and outcomes to the epicardial adipose tissue volume, such as diastolic filling [6], myocardial infarction [3], atrial fibrillation and ablation outcome [5], carotid stiffness [7], atherosclerosis [8][9][10], and many others [11,3,[12][13][14]. Furthermore, Chen et al. [15] have also shown that a high coronary artery calcium score may be associated to a higher general cancer incidence.
In addition, some studies address the importance of the mediastinal fat and its correlation with pathogenic profiles, health risk factors and diseases [16,17]. Some works [10,7] associate mediastinal fat, along with epicardial fat, to carotid stiffness. Others [10,4] relate these fats to atherosclerosis and coronary artery calcification. Sicari et al. [18] have also shown how mediastinal fat, rather than epicardial fat, is a cardiometabolic risk marker.
Moreover, a 16-year study [19] that assessed a total of 384597 patients found a rate of approximately 38.4% of deaths in the subsequent 28 days for individuals that had their first major coronary event. The same study also concluded that the probability of fatalities is slightly smaller in women. Another study ranked cardiovascular incidents as the most common cause of sudden natural death [20]. Therefore, the practice of automatically evaluating the amount of fat related to the heart may significantly contribute in avoiding similar outcomes.
Automated quantitative analysis of the epicardial and mediastinal fats could also add a prognostic value to cardiac CT trials, thus improving its cost-effectiveness. Besides that, automation diminishes the variability introduced by different human observers. In fact, quantifying the amount of fats by direct user intervention is highly prone to inter-and intraobserver variability. Thus, the evaluated samples may not be segmented using a set of objective principles. Iacobellis et al. [21] have shown that epicardial fat thickness and coronary artery disease, for instance, correlate independently of obesity. This evidence supports the need for individual segmentation and quantification of the adipose tissues rather than merely estimating epicardial fat based on the overall fat of the patient. In a previous work [1], we proposed an accurate method for automatically segmenting epicardial and mediastinal fats in CT exams. The method is mainly based on feature extraction [22] and classification algorithms [23]. However, registration is also performed for image alignment prior to feature extraction. Despite the superior accuracy of the results, when compared to the state-of-the-art, the downside of the approach is its processing time. Currently, it is able to automatically segment the cardiac fats (epicardial and mediastinal) of a patient (a set of approximately 50 images) in approximately 1.8 h.
In this work, we employ regression algorithms to predict the amount of one of the cardiac fats based on the other. This approach of correlation and prediction has not been previously addressed nor exploited in the literature. Furthermore, we also explore the feasibility of this approach, while comparing the performance of individual algorithms in the prediction task.

Materials and methods
We used the ground truth data available in [24,25] that was provided in our previous work [1]. The various images in the axial-plane were manually segmented by two experts. The epicardial and mediastinal fats in the images are represented as red and green pixels, respectively. The transition between the two (which also corresponds to the pericardium) is depicted in blue, as shown in the images of Fig. 2. Every non-black pixel in the image represents fat. In other words, black pixels represent everything that is not fat. More details on this fat range conversion can be found in [1,26].
The cardiac CT scan is composed of approximately 50 images. The amount of fat in these images varies depending on the slice number. In this work, we address the fact that the volumes of these two fats strongly correlate. Firstly, the images are converted to standard spacing in xyzspace so that the heart of each patient is approximately at the same scale. The term approximately refers to the fact that we use scanners from two manufacturers, which introduces variability.
As stated, blue pixels represent the pericardium, which is a very thin layer between the two fats. Since this information is already available in the ground truth, we decided to include it as a variable in the prediction. However, as the amount of blue pixels is very low, we would like to highlight some points about their treatment, as follows: (1) they can be ignored in the associated equations, if desired, (2) they can be considered either green or red pixels, (3) or even both red and green at the same time, as in our previous work [1]. Furthermore, (4) they could also be estimated by tracing the pericardium contour. The best approach depends on the task at hand and the requirements of the user.
It is important to emphasize that for predicting the epicardial fat (red pixels), the information we have a priori is depicted in Fig. 3-(a), where epicardial pixels are originally grey. Similarly, Fig. 3-(b) shows the a priori information when we wish to predict the amount of mediastinal (green) pixels. Fig. 4 shows the input amount of grey pixels in these two prediction cases. Fig. 4-(a) corresponds to the scenario where we wish to predict the amount of epicardial (red) pixels. It can be seen in that image that epicardial pixels are originally grey, since this information is not available prior to processing. The ground truth contains CT scans from 20 patients, which gives us a total of 878 images. For every image in the ground truth, we extract an instance of the dataset, which is composed of 7 features: (1) the amount of red pixels in the image, (2) the amount of green pixels in the image, (3) the amount of blue pixels in the image, (4) the amount of grey pixels in the image, (5) the amount of black pixels in the image (background), (6) the total amount of images of the associated scan and (7) the index of the slice to be processed (considering a scanning direction from head to feet).  Although the extracted features may seem fairly simple in nature, they suffice for the purposes of prediction, as demonstrated in our experiments. Our approach considers the amount of fat in a specific slice so as to minimize errors that would appear if we attempted to predict the entire volume at once. Furthermore, it offers an additional advantage as it counts the amount of pixels corresponding to each fat at each slice, thus permitting the analysis of the correlation as processing evolves along the axial plane.
After generating the dataset composed of 878 instances (one for each image), we used the Weka framework [27] to perform the experiments. The class we wish to predict is continuous and, thus, the problem is posed as regression. We analyse the performance of the various algorithms based on the correlation coefficient, mean absolute error (MAE), root mean squared error (RMSE), relative absolute error (RAE) and root relative squared error (RRSE). The Pearson correlation coefficient ρ is defined in Eq. (1): where a i stands for the predicted values and b i stands for the original values of the dataset, both with regards to instance i. a and b represent the mean of the predicted and original values, and n is the total number of instances.
The mean absolute error (MAE) is given in Eq.
(2) and measures the average error between the predicted and the original values: The root mean squared error is a very similar metric to MAE and is shown in Eq. (3): Example of the amount of grey pixels when predicting the epicardial and mediastinal fat. (a) Input amount of grey pixels when predicting epicardial (red) pixels (b) Input amount of grey pixels when predicting mediastinal (green) pixels (c) Potential amount of grey pixels that could be considered epicardial after the prediction of image (a) (d) Potential amount of grey pixels that could be considered mediastinal after the prediction of image (b). (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article).
The relative absolute error (RAE) and root relative squared error (RRSE) are essentially the MAE and RMSE, but in relation to the mean. Their formulations are given by Eqs. (4) and (5), respectively:

Regression algorithms
Let the instances of our problem be described in a R k space, where k is the total number of features of each and every instance. The regression problem consists of finding the vector of weights w that approximates the most the attribute values to the value we seek to predict (usually one of the attributes, say attribute k represents the value we want to predict). The predicted or estimated value for a given instance t ðiÞ is given by Eq.
The regression goal is to minimize the total error among all the instances of the dataset. Thus, we wish to minimize the error E on the training data, which is given by Eq. (7): There are many algorithms to determine the optimal set of weights, so as to minimize the error. However, the previous steps effectively summarize the methodology to be followed. A popular approach to solve regression problems are neural networks. These are function-based classifiers (similarly to linear regressors) and the computation of the weights can be performed using back propagation, for instance.
Whilst it may not be very intuitive, some decision tree-based algorithms can also perform regression really well (e.g., Random Forests algorithm [28]). They essentially discretize the data and treat the problem as a multi-label classification. Some lazy algorithms such as k-Nearest Neighbours (k-NN or IBk), which analyse the surrounding k instances in order to classify an unlabeled instance, are also fairly good regression algorithms.
The main issue that raises from applying k-NN, neural networks or decision tree algorithms to a regression problem is that the predictive models produced by these algorithms are frequently rather complex for humans to understand. In this respect, linear regression algorithms are more appropriate as they are easier to interpret and to reproduce, since the resulting predictive model is a simple linear function.

Experimental results
At first, we analyse the performance of several algorithms for predicting the amount of mediastinal fat based on the amount of epicardial fat and the remaining features. That is, among the 7 previously described features, the amount of green pixels (mediastinal fat) is the class of the problem (Section 4.1). In the next group of experiments (Section 4.2), the amount of red pixels (epicardial fat) is the actual class of the problem.
One may argue that it is not necessary to perform these two types of experiments, since if we have a single function that relates both epicardial and mediastinal fats, it can be used to predict either one. Although this is true for linear regression algorithms (since the resulting model is a linear function), this is not generally true for other types of non-linear algorithms (e.g., decision tree, neural networks, etc.). Clearly, it is not straightforward to "invert" a predictive model that is intrinsically complex. In this research we perform these two groups of experiments separately.

Predicting the amount of mediastinal fat based on the amount of epicardial fat
The indices shown in Tables 1, 3, 5 and 6 were obtained using 10-fold cross validation. The parameters of each algorithm were experimentally adjusted (two to three combinations of parameters were tested for each algorithm) and the best results were selected. We also set an upper time limit of 10 min for running each of the algorithms (including the cross validation testing time).
It is possible to see in Table 1 that the Rotation Forest [29] with the Multilayer Perceptron [30] (MLP) Regressor as one of its parameters was the best performer in this experiment, achieving a correlation coefficient of 0.9876. The plot in Fig. 5 shows the actual amount of mediastinal fat (green pixels) on the x-axis versus the predicted or estimated amount of mediastinal fat on the y-axis, using the Rotation ForestþMLP Regressor.
Although the Linear Regression algorithm did not perform as well as other algorithms, this is probably the only algorithm among the ones in Table 1 that generates a model that can be easily understood. The correlation achieved with the Linear Regression algorithm is shown in Fig. 6, and can be compared to where greenQnt represents the amount of mediastinal fat (green pixels) in the current slice (imageIndex th slice), redQnt represents the amount of epicardial fat (red pixels) in the slice, blueQnt represents the amount of blue pixels, blackQnt the amount of black pixels, imageIndex represents the number of the slice and imagesQnt represents the total number of slices in the patient scan. Once the amount of mediastinal fat pixels in each slice of a patient scan is estimated, it is trivial to obtain the total volume of this fat by accessing the xyz physical spacing information in the DICOM file and performing the conversion to a volume. The function in Eq. (8) must be computed for every slice of the scan. The only constant in this equation is imagesQnt, which does not change with regards to a single patient. The amount of grey pixels in the image was not relevant enough to be included in the prediction function, when using the linear regression algorithm. Table 2 shows 10 randomly selected slices from the 20 patients. The first column corresponds to the actual amount of mediastinal fat in the slice (amount of pixels), the second column corresponds to the predicted amount using the Rotation Forest and MLP Regressor, while the third column shows the error between the actual and estimated amounts. Table 3 compares the performances of individual regression techniques on the prediction of the amount of epicardial fat. The performance of the best algorithms in Table 1 is similar to those in Table 3. However, the ranking of the algorithms changed substantially. Overall, the indexes are lower than in the previous table. This suggests that it is more difficult to predict the amount of epicardial fat given the mediastinal than the opposite.

Predicting the amount of epicardial fat based on the amount of mediastinal fat
It is worth emphasizing that the Linear Regression algorithm performed substantially worse when compared to the mediastinal fat prediction ( Table 1). The resulting linear predictor trained on the entire dataset is shown in Eq. (9): redQnt ¼ À0:4608 Â greenQnt À 1:3373 Â blueQnt À 0:4736 Â blackQnt À 54:5244 Â imageIndex þ 47:9363 Â imagesQnt þ 123509:7603 (9) As previously mentioned, the regression algorithms did not perform as well in this class of the problem. Thus, we investigated whether inverting Eq. (8) could result in better performance. The Linear Regression algorithm in the mediastinal fat experiment achieved a correlation coefficient of 0.9534, which is fairly good in comparison to the correlation results in Table 3. Thus, if one wishes to predict the amount of epicardial fat given the mediastinal fat data, it could be better to consider the linear function of Eq. (8). Therefore, we experimented with the inversion of Eq. (8), which resulted in Eq. (10). However, when applying Eq. (10) to the problem, we obtain a correlation coefficient of 0.82369, where MAE ¼ 2319:5983; RMSE ¼ 3013:6908; RAE ¼ 55:95% and RRSE ¼ 56:70%. These indices are slightly worse than the ones obtained with the Linear Regression algorithm, which are shown in Table 3.
Thus, we concluded that, based on the available evidence, it is more appropriate to use Eq. (9) rather than Eq. (10).
Furthermore, Figs. 7 and 8 show the correlations of the best performing algorithm in this experiment (Rotation Forest þ MLP Regressor) and Linear Regression, respectively. The x and y axes represent the actual and predicted values of the amount of epicardial fat, respectively.
The predictive models generated in this experiment predict negative values in some slices as it can be seen in Figs. 7 and 8, which does not make sense in practice. This was not the case in the mediastinal fat experiment. Moreover, the spreading of the points in the plot is much wider in comparison to the previous experiment. The plots, however, have different scales, readily observable by the RAE and RRSE indices in Table 3.
In practice, the problem of negative values for the amount of epicardial fat could be resolved through normalization. Indeed, normalization could even further improve the accuracy of the obtained results. However, one of the intended purposes of this research is to propose a simple methodology for non-technical experts, where by directly inputting the information related to the amount of pixels for one fat, it is possible to obtain a fairly accurate prediction for the other type of fat, without any further need for processing. It may also be the case that the patient data could be outside of the normalization range. For instance, let us suppose that the maximum value for a certain attribute in the available training dataset is m. Thus, when the data is normalized, the maximum value for the particular attribute will be equal to 1. However, there may be instances where patients have attribute values higher than m, which was the available maximum on the training set. If this was to occur, regression models would not be able to provide sensible   predictions for these instances. Thus, we decided to disregard the application of normalization as a rectification procedure. Table 4 shows 10 randomly selected slices from the 20 patients. The first column corresponds to the actual amount of epicardial fat in the slice (amount of pixels), the second column corresponds to the predicted amount using the Rotation Forest and MLP Regressor, while the third column shows the error between the actual and estimated amounts.

Predicting both fats from unprocessed exams
For the sake of comparison, we perform a third and final experiment where the goal is to predict the epicardial and mediastinal fat volumes without preprocessing the images. That is, we investigate the prediction of the volume of the epicardial/mediastinal fat with no a priori information of the mediastinal/epicardial fat and the pericardium. Thus, the images of the patients would be entirely in greyscale, as shown in Fig. 9. Therefore, the pixels in these images are either grey, corresponding to fat, or black, depicting the background. Table 5 compares the results obtained with each algorithm in this experiment.It is possible to conclude that, with regards to Table 3, the reported errors have almost doubled in most occasions. This confirms the validity of the hypothesis that it is more accurate to predict one type of fat based on the other, instead of attempting to predict it directly from unprocessed fat data. Despite the fact that the resulting models are not as accurate as in the case of the previous experiments, nevertheless, they provide acceptable results for the purposes of prediction. Indeed, this approach could be useful if the volumes of both fats are unknown and there is a requirement for rapid fat volume estimation. Table 6 compares the results obtained when predicting the epicardial volume without any information of the mediastinal fat and pericardium. This experiment produced the worst results, the errors have nearly doubled, as shown in Table 5. In terms of medical relevance, accurate estimation of the epicardial fat is more significant than that of the mediastinal volume.
Figs. 10 and 11 show the correlation plots obtained for the best performing algorithm (Rotation ForestþMLP Regressor) for the mediastinal and epicardial fat, respectively. As expected, it is evident that errors are much higher than the ones in Sections 4.1 and 4.2. More specifically, the plot of Fig. 10 is more spread than that of Fig. 5 and the plot of Fig. 11 is more spread than that of Fig. 7.

Conclusions
In this research, we proposed the use of regression algorithms for predicting epicardial and/or mediastinal fats in relation to one another and to the image data. Two numerical values representing the volumes of the epicardial and mediastinal fats are the main interest in most medical analyses. Therefore, visual segmentation of the images can be bypassed if there exists a reliable way of estimating the required fat volume, such as the approach proposed in this contribution.
In a previous work [1], full segmentation of epicardial and mediastinal fat volumes took 1.8 h. Our experiments demonstrated that there is no strict need to process and segment both fats, but rather to only process one instead. Indeed, this implies some additional errors. However, the obtained results demonstrate a high correlation between the segmented  fat volumes and the estimated ones. The key benefit of this approach is that processing time is reduced by half, to approximately 0.9 h, using this methodology.
With regards to the reported results, it is preferable to predict the mediastinal fat volume based on the epicardial rather than the opposite. The correlation coefficient obtained by the Rotation Forest algorithm using the MLP Regressor as parameter for predicting the mediastinal fat was 0.9876, with a relative absolute error of 14.4% and root relative squared error of 15.7%.
The best correlation coefficient obtained for predicting the epicardial fat based on the mediastinal was 0.9683 with relative absolute error of 19.6% and relative squared error of 24.9%. The maximum correlation coefficient achieved when predicting the mediastinal fat with no a priori information of the epicardial and pericardium was 0.9549 with a RAE of 27.1% and a RRSE of 29.6%, which is almost double the average error obtained when information of the epicardial fat is considered or known a priori. In the case of the epicardial volume prediction, the correlation coefficient was 0.9283 with a RAE of 32.5% and a RRSE of 37.1%. Once again, approximately twice the average error obtained when the mediastinal volume information is used.
The produced errors arise due to various factors. Examples of these are the lack of a very accurate registration over the entire patient dataset, the use of different CT scanners, exceptions to the norm, and indeed the prediction power of the employed regression algorithms. Registration was performed in the ground truth images, but this was an automated procedure, proposed in our previous work [1] and inadvertently introduces errors. A manual, more accurate registration would reduce the errors produced on the prediction. Furthermore, if the CT scans are calibrated to each other, acquired with the same parameters and the same device as well as registered with an accurate registration, then the errors could be substantially reduced.
We conclude that it is possible to predict fairly confidently one type of fat based on the information of the other. Overall, the obtained results are encouraging. Of particular note is that the utilized ground truth contains CT images from two manufacturers (Siemens and Philips), which implies that the proposed methodology (e.g., associated regression models) may be applicable irrespectively of the type of the CT scanners. Further research will concentrate on evaluating the application of the generated linear functions and predictive models to CT examinations obtained using scanners of other manufacturers to verify their generalization properties.