In this section, we describe the dataset, data preprocessing methods, transfusion prediction, and the proposed nano-fuzzy alarm system for transfusion requirements.
data set
We use a dataset of 98 samples of blood cancer patients, including 61 features of demographic, clinical, and laboratory data from Firozgar Hospital. The review board of the Iran University of Medical Sciences (IUMS) waived the requirement of individual patient consent, as the study did not affect clinical care and all information was anonymized. All procedures were performed in accordance with the relevant guidelines. All experimental protocols were approved by the review board of IUMS. Data were anonymized and are not subject to the restrictions of HIPAA privacy rules. The used features, selected by performing multivariate analysis and expert approval, are presented in Table 1 in three categories, including demographic information, clinical features, and three sets of laboratory data.
Data Preprocessing
Here, we use vital signs and clinical laboratory values for each patient. We exclude values with more than 90% missingness, such as BMI, chemotherapy interval, chloride, anion gap, total iron, iron binding capacity, lactate, and transferrin. For values with more than 50% missingness, we consider 0 as an indicator of missingness and 1 as an indicator of missingness. We then use median imputation on values with missing indicators. To use a similar protocol across patients for heart rate, systolic blood pressure, and diastolic blood pressure values, we fix the first timepoint of each recorded data to the first recording. We then normalize the continuous data before training to ensure that the remaining variables are not influenced by very large values.
For the gender feature, we consider 1 to represent male and 2 to represent female. For medical history such as diabetes, cardiac, respiratory, and chronic kidney disease, as well as sepsis, active infection, active bleeding, and fever, we use 1 as an indicator of disease presence and 0 as an indicator of disease absence. For four types of blood cancer, namely acute lymphocytic leukemia (ALL), acute myeloid leukemia (AML), chronic lymphocytic leukemia (CLL), and chronic myeloid leukemia (CML), we consider 1 to 4. Furthermore, for chemotherapy, antibiotic injections, and blood transfusions, as well as smoking and alcohol use, we use 1 as an indicator of application and 0 as an indicator of non-application. Finally, we use 0 for negative Troponin T value and 1 for positive value. 7% of the training set and 4% of the test set were labeled as receiving red blood cell concentrates.
To reduce the influence of correlated variables in the neural network variables, we verify that the input variables are relatively uncorrelated using Pearson's correlation matrices shown in Figure 1 for geographic data, Figure 2 for clinical data, and Figures 3, 4, and 5 for laboratory data. As the results show, they are not correlated. In Figure 1, all demographic data except age are Boolean variables, and the remaining variables are continuous real-valued.

Pearson correlation matrix for geographic data.

Pearson correlation matrix for clinical data.

Pearson correlation matrix for the first experimental data set.

Pearson correlation matrix for the second experimental data set.

Pearson correlation matrix for the third experimental data set.
Next, we find the associated variables. In Figure 1, sepsis, active infection, and fever are associated. In Figure 2, DBP and SBP are associated. In Figure 3, Hgb and Hct are associated with platelets. Also, MCH is associated with MCHC, and TCD is associated with BE. In Figure 4, BUN and creatinine are associated. Also, PTT and PT are associated. In Figure 5, CK and CK-MB are associated with Troponin T, CK is associated with CK-MB, BR is directly associated with TBIL, and finally, ALP and AST are associated with ALT.
Selection of distinguishable parameters in blood transfusion
First, we analyze the data to find the parameters that can distinguish the need for transfusion. Therefore, in Figures 6, 7, 8 and 9, we show the scatter plots of the data according to two categories: transfusion and non-transfusion. Therefore, the following variables are selected as the most distinguishing parameters: SBP in Figure 6, platelets, Hct, Hgb in Figure 7, and SpO2, PaO2, pH, TCD, BE in the presence of Hct and Hgb. Furthermore, in Figure 8, creatinine, BUN, PTT are selected, and finally, in Figure 9, there are no distinguishing variables.

Scatter plot of clinical data for two types of blood transfusion.

Scatter plot of laboratory data for two types of blood transfusion.

Scatter plot of the second test data set for the two types of transfusions.

Scatter plot of the third test data set for the two types of transfusions.
Considering the analyzed data, we use these identifiable variables as Artificial Intelligence (AI) based biomarkers to determine the need for blood transfusion. Hence, in this paper, we use nanomachines to sense the changes in the values of these biomarkers and determine the right time for transfusion. For this, we first perform predictions and then leverage the data to propose a nano-alert system regarding the need for blood transfusion.
Transfusion prediction
To perform predictions, we use Long Short Term Memory (LSTM), a type of recurrent neural network (RNN) that can process information passed between subsequent time iterations. In this modeling, \(x\left(0\right)\), \(x\left(1\right)\)…, \(x\left(T-1\right)\) Here, we represent the input variables at the start of each 24-hour period, \(\widehat{y}\left(0\right)\), \(\widehat{y}\left(1\right)\)…,\(\widehat{y}\left(T\right)\)where \(\widehat{y}\left(T\right)\in \left[0\text{,}1\right]\) is the output to predict transfusion. In the last layer, we consider LogSoftmax to obtain the log probability of the output. \({\text{p}}\left({1}\right)\text{, p}\left({2}\right)\text{, . . , p}\left({\text{T}}\right)\) among them \(p\left(t\right)\) teeth, \(\widehat{y}\) About two classes.
Nano-alert system signals need for blood transfusion
In this section, we propose a feasibility study of a nano-fuzzy alarm system for the need for blood transfusion (NFABT).twenty four Cancer cell scaffoldingtwenty fivewe proposed a bioinspired nanomachine for cancer therapeutic drug delivery.26in case of oxygen deficiency7Here, we propose a nano-alarm system for blood transfusion utilizing red blood cell-inspired nanomachines. For this, each nanomachine is equipped with a fuzzy basis function (FBF) and the overall fuzzy system is calculated using a swarm of FBFs. Figure 10 shows the proposed NFABT method.

Proposal of a nano-fuzzy alarm system for blood transfusion need (NFABT).
Considering the analysis in “Data Preprocessing”, select the three parameters: Hgb, PaO.2,Possible pH values as inputs for the FBF of the NFABT.,These values are sensed using bio-nanosensors for blood,embedded in each nanomachine.,The output of this system is the status of the blood with respect to the,need for transfusion and the whole system alerts the,need for transfusion.
Therefore, input of Hgb and PaO2pH and blood status output as markers of transfusion need in the universe of discussion [7,16.6], [40,80], [6.3,7.8]and [0,1]Taking into account expert suggestions and clinical guidelines, we define four MFs for input: {very low, low, normal, high}, {normal, mild hypoxia, moderate hypoxia, severe hypoxia}, {acidosis, normal, alkalosis}, and two MFs for output: {low, normal}. The centers of the input and output MFs are {8, 10.25, 14.1, 16.6}, {30, 47.5, 65.75, 90}, {7.35, 7.4, 7.45}, and {0.25, 0.75}, respectively. \({4}^{2}\times {2}^{1}=32\) A possible rule such as that shown in (1).
In particular, first \(I\)Number of inputs \({z}_{j}\) For overlapping membership functions (MFs) that are assumed to be regular, complete, and consistent, regular, complete, and consistent fuzzy rules are adaptively generated in the form of (1) using data.
The rule index is \({\text{i}} \, = \, 1, 2, \ldots, {\text{R}}\)The input variables are \({\text{z}}_{\text{j}} \, \left({\text{j}} \, = \, 1, 2, \ldots, {\text{m}}\right)\) and \(k\) This is an output variable. \({A}_{j}^{i}\) and \({B}^{i}\) It is a linguistic term defined by input and output MFs. \({\mu }_{{A}_{j}^{i}}\left({z}_{j}\right)\) and \({\mu }_{{B}^{i}}\left(k\right)\)Each.
$${R}_{i}=\text{IF} {z}_{1} \,\text{is}\, {A}_{1}^{i} \,\text{and}\, {z}_{2} \,\text{is}\, {A}_{2}^{i} \,\text{and}\dots \text{and}\, {z}_{j} \,\text{is}\, {A}_{j}^{i} \,\text{then}\, k \,\text{is}\, {B}^{i},$$
(1)
As previously discussed in Ref.7 It has been proven that using triangular MF, the sum of multiplications in FBF is equivalent to a general fuzzy system consisting of a singleton fuzzifier, a centroid defuzzifier, and a product inference engine. Here, we apply the proof to design a fuzzy system using (2).
$$f\left(z\right)=\sum_{i=1}^{R}{d}_{i}\left(z\right){\theta }_{i},$$
(2)
where \({\theta }_{i}\) In the output space, the output membership functions are \({\mu }_{{B}^{i}}\left(k\right)\) It reaches a maximum value of 1, \({d}_{i}\left(z\right)\) is the FBF defined in (3).
$${d}_{i}\left(z\right)=\prod_{j=1}^{m}{\mu }_{{A}_{j}^{i}}\left({z}_{j}\right),$$
(3)
where \({\mu }_{{A}_{j}^{i}}\left({z}_{j}\right)\) This is the input MF.