A new computer‐aided diagnostic method for classifying anaemia disease: Hybrid use of Tree Bagger and metaheuristics

Anaemia occurs when the haemoglobin (Hgb) value falls below a certain reference range. It requires many blood tests, radiological images, and tests for diagnosis and treatment. By processing medical data from patients with artificial intelligence and machine learning methods, disease predictions can be made for newly ill individuals and decision‐support mechanisms can be created for physicians with these predictions. Thanks to these methods, which are very important in reducing the margin of error in the diagnoses made by doctors, the evaluation of data records in health institutions is also important for patients and hospitals. In this study, six hybrid models are proposed to classify non‐anaemia records, Hgb‐anaemia, folate deficiency anaemia (FDA), iron deficiency anaemia (IDA), and B12 deficiency anaemia by combining artificial intelligence and machine learning methods TreeBagger, Crow Search Algorithm (CSA), Chicken Swarm Optimization Algorithm (CSO) and JAYA methods. The proposed hybrid models are analysed with two different approaches, with/without applying the SMOTE technique to achieve high performance by better emphasizing the importance of parameters. To solve the multiclass anaemia classification problem, fuzzy logic‐based parameter optimization is applied to improve the class‐based accuracy as well as the overall accuracy in the dataset. The proposed methods are evaluated using ROC criteria to build a prediction model to determine the anaemia type of anaemic patients. As a result of the study on the dataset taken from the Kaggle database, it is observed that the six proposed hybrid methods outperformed other studies using the same dataset and similar studies in the literature.

as lethargy, weakness, and fatigue, while severe anaemia can also present with shortness of breath and decreased exercise tolerance (Turner et al., 2022).
According to WHO, anaemia is a condition in which the body does not receive enough oxygen due to insufficient number and function of Hgb or red blood cells in the blood related to conditions such as gender, nutrition, and so forth.Anaemia is detected by performing a complete blood count (hemogram) test by examining the Hgb density.When the Hgb value falls below 7.0 g/dL, many patients develop some symptoms of anaemia (Turner et al., 2022).According to Turner, normal Hgb ranges are as follows: 13.5-18.0g/dL in men, 12.0-15.0g/dL in women, 11.0-16.0g/dL in children, and usually above 10.0 g/dL in pregnancy (Turner et al., 2022).Iron deficiency anaemia (IDA), B12 deficiency anaemia and folate deficiency anaemia (FDA) are subtypes of nutritional anaemia (Kilicarslan et al., 2021).Patient outcomes need to be improved with appropriate treatment.This is because IDA can lead to the progression of medical conditions such as heart failure, ischemic heart disease, and hemodynamic instability (Choi et al., 2023;Ning & Zeller, 2019).It is estimated that 25% of the world's population is anaemic and more than 60% of anaemia is caused by iron deficiency, affecting approximately 2 billion people (Phillips & Brittenham, 2023).The highest rates of iron deficiency worldwide occur in infants, preschool-aged children, and women of childbearing age (Green et al., 2017).IDA anaemia negatively affects children's mental development, delays their growth, and reduces productivity in adults.B12 deficiency anaemia can affect individuals of all ages but is particularly common in the elderly (Green et al., 2017).Infants, children, adolescents, and women of reproductive age are also at high risk in societies where animal foods containing B12 are limited in the diet (Green et al., 2017).FDA is caused by reduced production of blood cells due to folate deficiency.Fatigue, weakness, shortness of breath, pale skin, low appetite, and digestive problems are symptoms of FDA.It is especially risky during pregnancy because the foetus needs enough folate for normal development.Therefore, adequate folate intake before and during pregnancy is important.
Anaemia caused by iron deficiency is usually normocytic (Obeagu et al., 2023).This means that normal-sized red blood cells are seen.However, in anaemia caused by folate or vitamin B12 deficiency, abnormally sized red blood cells origins called megaloblasts are found in the bone marrow (Obeagu et al., 2023).This can create diagnostic difficulties and means that many conditions diagnosed as iron deficiency may be caused by folate or vitamin B12 deficiency (Obeagu et al., 2023).Our study shows its importance at this point.To solve the multiclass anaemia problem, the overall accuracy of the dataset and the class-based accuracy are of great importance.In other words, the problem is that the conditions diagnosed as iron deficiency in the previous paragraph can also occur due to folate or B12 and cause patients to receive incomplete or incorrect treatment.For this purpose, we aim to increase class-based classification success in addition to the overall classification success in our study.In order to overcome such diagnostic challenges and improve the diagnostic process, computer-aided decision support systems are being designed for physicians.
The processing of biomedical digital data and the evaluation of data records in hospitals are important for designing decision support systems for physicians.Recently, there have been many studies on digital data processing and classification of patient data records (Nsugbe, 2023;Sonawani et al., 2023).In studies on digital data processing, numerical data (blood count, CRP level, etc.) from patients are usually processed and systems are developed to help doctors respond to new patients faster and more accurately.Classical machine learning methods such as support vector machines, Naïve Bayes, Regression, k-nearest-neighbourhood, deep learning methods such as CNN (Convolutional Neural Networks), SAE (Stacked Autoencoder) and nature-inspired metaheuristics such as PSO (Particle Swarm Optimization), HHA (Harris Hawks Algorithm), and ABC (Artificial Bee Colony) have started to be used in studies (Kaur et al., 2021;Lahmiri & Boukadoum, 2014).
In data mining and machine learning studies, the feature selection method is used to determine the effect of the parameters in the dataset on classification and to select meaningful and important features while evaluating data records.To overcome the problems encountered in storing large datasets, feature selection is the process of discarding the parameters with low importance in the dataset and keeping the parameters with high importance in the dataset (Budak, 2018).In feature selection based on classical logic, the multiple of the parameters in the dataset takes the value 0 or 1.If the parameter is to be included in the data set, its coefficient is 1, and if it is to be removed from the data set, its coefficient is 0. In contrast to feature selection, to emphasize the importance of the parameters, they should be multiplied by a weight vector so that all parameters affect the classification success at different rates.Instead of removing the parameter with low importance from the dataset, it should be multiplied by a low weight coefficient to reduce its impact on classification.
While one parameter may have a great impact on disease diagnosis, another parameter may have little or even no impact at all.To avoid misdiagnosis and class-based failures in multi-classification problems, such as when many conditions diagnosed as iron deficiency are folate or vitamin B12 deficiency, it is necessary to reduce or increase the influence of the coefficients of the parameters, inspired by the fuzzy logic approach.The RF algorithm estimates the importance of parameters by sequentially extracting each attribute and calculates an importance score for each attribute by measuring the OOB (Out-of-bag) error.Among machine learning algorithms, the RF algorithm, which is a supervised learning algorithm, is frequently used in the literature because it produces high classification accuracy and works effectively on large databases.It has been successfully used in many fields such as image processing, control studies, natural language processing, robotics, biomedicine and cyber security (Choubisa et al., 2022;Kara et al., 2023;Masud et al., 2017;Mohapatra & Mohanty, 2020;Paul et al., 2018;Zhang et al., 2020).It is also used in disease prediction and classification studies (Komal Kumar et al., 2019;Sun et al., 2017;Xu et al., 2017).For many years, there have been many studies on binary classification of anaemia patient records (anaemia/healthy) and classification according to anaemia types (Thalassemia, vitamin B deficiency anaemia, etc.).Many machine learning methods have been proposed in the literature to predict and classify anaemia.These methods include k-Nearest Neighbourhood (k-NN), Support Vector Machines (SVM), Decision Trees (DT), Random Forest (RF), Logistic Regression (LR), Fuzzy Logic (FL), Vector Quantization Neural Networks (LVQ), and so forth.These methods used in studies may not perform well due to different characteristics in different datasets.Different parameter properties and numbers in the datasets, such as variation in the number of patient records, significantly affect the success of anaemia disease classification methods.
Therefore, it is important to develop new techniques since the characteristics and parameter numbers of the datasets studied may be different (Kilicarslan et al., 2021).
Due to the increasing complexity of engineering problems, it has become difficult to solve problems with classical machine learning methods.
The limitations of classical methods in solving complex problems have necessitated the development of new methods inspired by nature (Deb et al., 2020).Examples of nature-inspired algorithms include CSO, CSA, JAYA, ACA (Ant Colony Algorithm), ABC, and so forth.These methods are frequently used in data mining (Hamdi et al., 2022;Lakshmi et al., 2018;Parpinelli et al., 2001;Zhang et al., 2010).Metaheuristics have been successfully used in different problems due to their avoidance of local optimum points, derivative-free structure, flexibility, ease of application, and so forth.(Blum & Roli, 2003;Borne & Gharbi, 2019;Crispim & Brandão, 2005).However, it is seen that the use of metaheuristics, especially in recent years, is limited in anaemia classification problems.
In this study, we used the hemogram data of 15,300 patients obtained from Tokat Gaziosmanpas ¸a University Faculty of Medicine in the study 'Hybrid models based on genetic algorithm and deep learning algorithms for nutritional Anaemia disease classification' by Kilicarslan et al.The dataset consists of records of individuals with Hgb-anemia, vitamin B12 deficiency anaemia, iron deficiency anaemia, folate deficiency anaemia, and non-anaemia.In this study, we propose six different hybrid models for anaemia disease prediction and classification according to 2 different approaches by combining the TreeBagger method, which is a tool that implements the RF algorithm in Matlab, and a model formed by combining decision trees, with the CSO, CSA, and JAYA algorithm.Approach 1 is the approach where the anaemia dataset is subjected to 10-fold crossvalidation and training and testing is performed, while approach 2 is the approach where data multiplexing is performed by applying the SMOTE technique to the training part of the dataset divided into 10 parts with 10-fold cross-validation.Thus, the proposed methods are applied to balanced data.This paper presents a new hybrid approach to the literature for anaemia disease classification that offers better disease diagnosis with metaheuristics that can apply the best solutions in local areas by exploring the research area.Inspired by nature and trying to find globally optimal solutions through random discovery, these metaheuristics use the intrinsic processes of the methods themselves to find optimal solutions.With metaheuristics, each parameter is given a degree of importance based on its success in classification, so that the optimization process can be carried out without getting stuck in a local optimum and obtain a set of solutions instead of a single solution.The CSO, CSA, and JAYA metaheuristics, which efficiently explore the space without being sensitive to the size of the search space, have the advantages of having fewer parameters, converging early, and providing solutions by exploring the space better than other metaheuristics (Dixit et al., 2015;Gupta et al., 2019;Wu et al., 2015).These solutions will improve classification success both in terms of overall accuracy and class-based accuracy.
Inspired by the fuzzy logic approach, the proposed hybrid models aim to achieve high performance by better emphasizing the importance of parameters in the multiclass anaemia classification problem, where the number of patient data is not proportional, and to increase the class-based success.To the best of our knowledge, no fuzzy logic-based work has been done to improve the class-based performance of multiclass anaemia classification.At the same time, it is aimed to present a strengthened TreeBagger method to the literature by improving the importance score calculated by the TreeBagger method for each parameter.In addition, as a result of the experimental evaluations, the best classification accuracy was obtained with the TreeBagger_CSA_SMOTE model with 99.92% success when the TreeBagger method was strengthened with the CSA algorithm by applying the SMOTE technique.A detailed comparison of the proposed models with other metaheuristics and the use of different data multiplexing techniques can be included in future studies.In this study, the proposed methods were only used to classify a multi-class anaemia dataset.The limitations of the study are: Due to the different characteristics of different datasets and the use of different initial values for the proposed methods, the proposed methods may not perform well when adapted to different studies.
The main contributions of this paper can be summarized as follows: • The main contributions of this article can be summarized as follows: • It reviews recent work to classify the anaemia dataset.
• It tests classical methods commonly used in the literature for anaemia classification or other classification problems with the same dataset.
• It proposes six new hybrid models for the classification of the medical blood dataset using Treebagger and CSO, CSA, and JAVA metaheuristics.
• With the proposed models, the data set with data imbalance is balanced with the SMOTE method, and the class-based accuracy is improved by obtaining parameter coefficients that will better emphasize the importance of the parameters inspired by the fuzzy logic approach.To the best of our knowledge, there has been no fuzzy logic-based study aiming to increase the class-based success for multi-class anaemia disease classification.
• The analyses performed on the balanced dataset were compared with the analyses performed before balancing.
• By improving the importance score calculated by the TreeBagger method for each parameter, a strengthened TreeBagger method was presented to the literature.
The sections of the study can be summarized as follows.In the Section 2, a literature review is presented.In the Section 3, information about the anaemia dataset used in the study is given and the proposed methods are discussed.In the Section 4, performance evaluation criteria are presented.Section 5 presents the experimental results of the methods and Section 6 presents the discussion.Finally, conclusions are given in the Section 7.

| LITERATURE REVIEW
When the literature is reviewed, there are studies using machine learning-based classical methods, studies using artificial neural networks and deep learning methods, and studies using nature-inspired metaheuristics.In studies using classical machine learning-based methods, k-NN, SVM, LR, and so forth are generally used.In the study by Khan et al. (2019), tests were conducted by selecting a sample of 2013 children for anaemia, which is a serious health problem, especially among children in Bangladesh (Khan et al., 2019).In this study, various machine learning algorithms such as linear discriminant analysis (LDA), classification and regression trees (CART), k-NN, SVM, RF, and LR were used.It was concluded that the RF algorithm achieved the best classification accuracy with 70.73% recall, 66.41% specificity, and 0.6857 AUC.El-kenawy (2019) proposed a new machine learning method (HEAC-Haemoglobin Estimation and Anaemia Classification) for Hgb level prediction and anaemia classification (Elkenawy, 2019).The proposed model consists of two important stages: regression and classification.In the first stage, the regression stage, the amount of Hgb is estimated based on 11 parameters, and in the second stage, the classification stage, the type of anaemia is classified using the estimated Hgb and the other 11 parameters.The dataset used in the study consists of 904 patient records and was compared with other methods proposed in the literature and found to perform the best.Jaiswal et al. (2019) investigated the performance of Naive-Bayes (NB), RF, and DT algorithms for anaemia disease prediction from blood data in 200 patient records collected from a pathology centre (Jaiswal et al., 2019).
The best performance was obtained with NB using seven different parameters.In a study by Sanap et al. (2011), high performance was achieved using k-NN and C4.5 decision tree (Sanap et al., 2011).In a study by Jatoi et al. (2018), they found a relationship between haemoglobin disorders and anaemia patients using 12 blood parameters (Jatoi et al., 2018).They also noted that high or low MCH and MCV of patients are considered as the main causes of anaemia and thalassemia.In a study by Yıldız et al. (2021), 12 different types of anaemia were diagnosed with four different machine learning methods using 1663 patient records and 25 blood parameters (Yıldız et al., 2021).The highest accuracy (85.6%) was obtained using Bagged Decision Trees.Abdullah and Al-Asmari (2016) classified five anaemia types with seven different blood parameters using blood records from 41 anaemic patients (Abdullah & Al-Asmari, 2016).Using classification algorithms such as NB, Multilayer Perception, J48, and Sequential Minimal Optimization (SMO), the highest success was achieved with J48.Hasani and Hanani (2017) examined three different types of anaemia: IDA, β-thalassemia carriers, and α-thalassemia carriers (cis and trans) (Hasani & Hanani, 2017).In a study by Meena et al. (2019), the relationship between the mother's health and diet during pregnancy and the child's anaemia status was determined using a dataset of Indian children (Meena et al., 2019).DT and association rule classification methods were applied in the study and it was concluded that the decision tree method was more successful.Çil et al. (2020) developed a decision support system using LR, k-NN, SVM, Extreme Learning Machine, and Regularized Extreme Learning Machine classification algorithms to distinguish between β-thalassemia and iron deficiency anaemia (Çil et al., 2020).With seven different blood parameters from 342 hospitals, k-NN achieved the highest success with an accuracy rate of 95.59%.Successful results have also been obtained in studies using artificial neural networks and deep learning methods.In a study by Yılmaz and Bozkurt (2012), two classes of problems were examined and Feed Forward Networks (FFN), Cascade Forward Networks (CFN), Distributed Delay Networks (DDN), Time Delay Networks (TDN), Probabilistic Neural Network (PNN) and LVQ methods were used to determine whether an individual was anaemic or not (Yılmaz & Bozkurt, 2012).The blood data set of 2600 women and six different blood parameters were used in the study.As a result of the test process, it was determined that the FFN method gave the best performance result with 97.60% precision and 99.16% accuracy.In a study by Azarkhish et al. (2012), an artificial neural network (ANN) and an adaptive neuro-fuzzy inference system (ANFIS) were developed to predict IDA using four blood parameters (Azarkhish et al., 2012).It has been emphasized that ANFIS is superior in the diagnosis of ADHD.In the study by _ Ilaslaner and Güven (2019), the data of 100 individuals were evaluated to create a decision support system to help physicians evaluate the relationship between biochemistry parameters and ADHD ( _ Ilaslaner & Güven, 2019).The highest performance was obtained with ANN neural networks.In a study by Yavuz et al. (2014), 98.73% success was achieved in the DEA classification problem using PNN, FFN, Gini algorithm, and Clone selection algorithm using blood values taken from 2600 female patient records (Yavuz et al., 2014).In a study by Almugren et al. (2018), ANN, NB, C4.5, and JRip methods were applied to find the relationship between vitamin B12 levels and blood cell count in a patient dataset with 14 parameters and 5637 records (Almugren et al., 2018).As a result, ANN and JRip algorithms showed the best performance with 100% success rate.Kilicarslan et al. (2021) proposed two hybrid models using Genetic Algorithm (GA) and SAE and CNN deep learning algorithms for prediction of Hgb-anaemia, iron deficiency anaemia, B12 deficiency anaemia using 15,300 patient records and 24 blood parameters (Kilicarslan et al., 2021).The performance of the GA-CNN algorithm was found to be better than the studies proposed in the literature with an accuracy rate of 98.50%.Yu et al. (2017) tried to predict three classes of severe anaemic, anaemic and non-anaemic (Yu et al., 2017).In the study, using 10 parameters, severe anaemic data set was reduced to two classes due to insufficient data and anaemic/non-anaemic classification was performed with 77% success rate with ANN model.In a study by Elshami and Alhalees (2012), classification was performed on seven different labels using 46,920 patient records and 11 blood parameters (Elshami & Alhalees, 2012).When the experimental results were analysed, a 95.71% success rate was obtained with ANN, and MCV ≤ 77.65 was determined as an indicator for thalassemia disease.
When studies using nature-inspired metaheuristics for anaemia classification were examined, it was seen that the studies were generally used to improve a specific method.Aswad et al. (2022) developed a hybrid method between a deep neural network (DNN), differential evolution algorithm (DEA), and simulated annealing (SA) to improve anaemia disease classification.In the results of the developed hybrid method, metaheuristics, which can explore the research area and apply the best solutions in local areas, were found successful in improving the DNN method (Aswad et al., 2022).Kilicarslan et al. (2021) successfully used GA to improve SAE and CNN deep learning algorithms (Kilicarslan et al., 2021).In the study, the hyperparameters of SAE and CNN algorithms were optimized using the global and local search capabilities of GA.
When the studies on anaemia are examined, it is seen that there are few studies in which different types of anaemia are classified and classbased achievements are important, and at the same time, metaheuristics aiming to find the best solutions in local areas are used.This study aims to present new hybrid models to the literature by developing classification methods for different types of anaemia.Unlike similar studies with a small number of patient records, more data and parameters are used with the new hybrid models presented, and Kilicarslan et al. (2021) aim to increase the overall and class-based classification success rate by using the complete blood count results of 15,300 patients taken between 2013 and 2018.

| Dataset
The data used in the study is a dataset made available for open access in the Kaggle database as a result of a study by Kilicarslan (n.d.).The dataset was obtained from Tokat Gaziosmanpasa University Faculty of Medicine and contains complete blood count results of 15,300 patients between 2013 and 2018.The data of children, pregnant women, and cancer patients were excluded from the study, noise in the dataset was cleaned, and insignificant parameters and missing parameter records were removed by Kilicarslan et al.
Table 1 shows the characteristics, maximum-minimum, and average values of the dataset with 24 parameters and 5 classes.The distribution values of the classes within the dataset are also shown in Table 2.As can be seen in Table 1, due to the large numerical difference between the parameter values, normalization was performed by taking blood values between 0.1 and 0.9 in the pre-processing stage of the data to obtain more consistent results.Table 2 shows that there is an imbalance in the number of enrolments between classes.SMOTE (Synthetic Minority Over-Sampling Technique) was applied to balance the dataset due to the data imbalance seen in Table 2.This technique, which is an over-sampling process that generates synthetic data, is frequently used in data science projects (Wongvorachan et al., 2023).By focusing on the classes where the number of data is low, new samples of these classes are created by taking into account the attributes and nearest neighbour relationships of the data (Ciran & Özbay, 2022).
In this study, 10-fold cross-validation is used for all proposed models.With 10-fold cross-validation, the dataset is divided into 10 different subsets and one group is used as the test set and the other group is used as the training set.Thus, each of the 10 datasets is evaluated once as a test set and all combinations are tested and each result is averaged.Thus, since there is a class imbalance in the dataset, the class distribution is preserved to avoid problems in model learning and performance evaluations.In other words, due to the high number of non-anaemia records in the dataset, the model can learn this class very well and misclassify the FDA class due to the low number of records.Such situations are avoided by keeping the representation of each class in the training and test sets similar to the overall proportion in the dataset.
The combination of SMOTE technique and k-fold crossover methods is available in many studies in the literature (Aditsania & Saonard, 2017;Aydin, 2022;Effendy & Baizal, 2014).The order of application of the two methods is important for performance evaluation (Aydin, 2022).In this study, we first analyse the proposed methods without data multiplexing and then analyse the proposed methods using the SMOTE technique.As can be seen in Table 3, during the application of the SMOTE technique, one part of the data set divided into 10 equal parts was reserved as test data.The remaining 9 parts were balanced with SMOTE and the proposed methods were run on the data set.The performance of the models was measured on the test data.Thus, by using the test data with similar features to the training data with resampling, high performance is achieved and an unhealthy result is not reached (Blagus & Lusa, 2015).This process was repeated iteratively for each part and the results were averaged.
Table 4 shows the proportions of the dataset belonging to different classes obtained in the 3rd iteration, 5th fold for example, as a result of applying the SMOTE technique to the dataset.
In this study, as the model names and descriptions are shown in Table 5, CSO, CSA and JAYA methods were hybridized with the TreeBagger method and 6 different models were proposed using 2 different approaches for the anaemia classification problem, the structure of which is shown in Figure 1.Some of the definitions in Table 5 are  The parameter values presented in Table 6 were used in the proposed methods.The proposed methods for the classification of patients with Hgb-anaemia, iron deficiency anaemia, B12 deficiency anaemia, folate deficiency anaemia and non-anaemia are based on two different approaches, with and without data multiplexing, with the aim of making the correct diagnosis by emphasizing the importance of the parameters with high impact and reducing the importance of the parameters with low impact, and achieving higher success by providing successful classification in classes with few data records.
Looking at Figure 1, where the summary of the study is presented, the collected data was subjected to 10-fold cross-validation after preprocessing.During the cross-validation, 2 different approaches were used.The 1st approach (NORMAL) is to train and test the proposed methods with only 10-fold cross-validation.The 2nd approach (SMOTE) is the approach where data multiplexing is performed using the SMOTE technique.With this approach, 9 parts of the data set divided into 10 equal parts are balanced with SMOTE and subjected to the training process.
For the test, the test was performed on the part that was not multiplexed.
T A B L E 1 Anaemia dataset features.

| TreeBagger method
Ensemble Learning refers to a collection of models that come together to create a new classification or prediction using the same learning method.Bagging and Boosting are among the most common methods.The ensemble learning method, the Bagged Tree Method, trains multiple decision trees using the dataset.The tree generation process creates many bootstrapped data sets from the original data set to train the classifier and generates trees for each data set.It then combines the predictions of these trees to generate the final result (Abraham et al., 2019).MATLAB ® 's 'TreeBagger' function builds a decision tree for classification using the 'predict' function and makes classification predictions (Abraham et al., 2019;Matlab, 2012).When used for classification, the method that combines multiple decision trees generates many decision rules to find which class any given data belongs to.These decisions try to classify the data using many different features (Abraham et al., 2019).In the end, the classification made by each tree is combined as a result class using the weighted voting method (Abraham et al., 2019).Ensemble Learning methods used to improve predictive performance combine and average decision trees.The bagging method (or bootstrap aggregation) is a technique used to create new datasets with approximately the same sampling distribution as a dataset, while the RF method is an extension of the Bagging method and randomly selects a subset of features (Abraham et al., 2019).So random forests can be thought of as a combination of 'bootstrapping' and 'feature bagging' (Abraham et al., 2019).The TreeBagger algorithm generates a decision tree ensemble for classification using  the RF method.It creates a bag of the dataset using bootstrap sampling and randomly selects a subset of features to be used in each decision split.
OOB (out-of-bag) observations are observations that are not used in the creation of each decision tree.These observations are used as a validation data set that is left out by each tree and is then used to evaluate the performance of the model.OOB predictions can be used as a measure of the model's performance.The 'OOBPrediction' option is used to store the information on which observations are left out of the bag for each tree.The 'OOBPredictorImportance' option is another OOB statistic used to determine the variable importance of the model.

| Chicken Swarm Optimization Algorithm (CSO)
CSO, a nature-based algorithm that models the behaviour of chickens in search of food, grouped into 3 categories of chickens: hens, roosters, and chicks, was introduced to the literature in 2014 by Xianbing Meng, Yu Liu, Xiaozhi Gao, and Hengzhen Zhang (M, A. O, 2018;Meng et al., 2014;Verma et al., 2023).
The algorithm works as follows; there are groups in the swarm consisting of a rooster, hens, and chicks (Gullu, 2021;Meng et al., 2014;Verma et al., 2023).Roosters are identified as the individuals with the best fitness value, while at the same time acting as the leader in the group.Chicks are designated as the individuals with the worst fitness in the swarm.The remaining individuals are designated as hens.The hens in each subgroup follow their rooster, the group leader, in search of food.Occasionally, there may be cases of stealing food from other hens.It is assumed that chicks can randomly steal food found by other individuals and that each chick follows its mother in search of food.Hierarchical order in the swarm is maintained by assigning randomly selected hens the role of mothers of randomly selected chicks (Gullu, 2021;M, A. O, 2018;Meng et al., 2014;Verma et al., 2023).In the next stage, position-shifting operations are performed to search for food.The position-shifting movements require different operations for roosters, hens, and chicks.The hierarchical structure of the CSO algorithm is given in Figure 2.
Equation (2) expresses the location change formula for roosters based on Equation (1).Since roosters have the best fitness values, they have priority in reaching food, which allows them to find food in a larger area (Gullu, 2021).x t i,j , denotes the position information of the i member at time t.If a randomly selected rooster in the rooster group is represented by k and the fitness value pfit is given a constant value ε ð Þ to avoid the problem of dividing by zero (Gullu, 2021).
Hens usually follow the group leader rooster when foraging, but sometimes they may also eat food found by other hens.Hens with high fitness values have an advantage over hens with low fitness values in foraging (Gullu, 2021).
The group leader with the hen represents the rooster, r 1 and r 2 represent a random hen or rooster selected from the swarm.
A small S 2 means that the difference between the fitness values of the two hens, that is, the distance between their positions, is large.This means that chickens cannot easily steal food from other chickens.The formula for S 1 is different from S 2 because there is competition in the group.If S 2 is 0, it means that the hen follows the rooster in its territory in search of food.The movement of the hens is given in Equation ( 5).
Chicks moving around their mothers in search of food are positioned as specified in Equation ( 6).FL is a representative parameter of how fast a chick will follow its mother (Gullu, 2021).
CSO steps for solving the anaemia classification problem are given in Table 7.
F I G U R E 2 Hierarchical system of the chicken swarm.
The weight vector emphasizing the importance of the parameters in the classification result of the TreeBagger_CSO model proposed to solve the anaemia classification problem according to 2 different approaches is given in Table 8.
Looking at the weight vector corresponding to each parameter found by optimizing the TreeBagger method with CSO (TreeBagger_CSO) in Table 8, it is seen that the TSD parameter has the highest effect on the classification success, while the LY, MO, PLT and MPV parameters do not affect the classification.Looking at the weight vector corresponding to each parameter found by optimizing the TreeBagger method with CSO (TreeBagger_CSO_SMOTE) on the data set multiplexed with the SMOTE technique, it is seen that the MCH parameter has the highest effect on the classification success, while the SDTSD parameter has the lowest effect on the classification.Thus, the effect of each parameter on the classification success was optimized with CSO and took values between 0 and 1.

| Crow Search Algorithm (CSA)
In 2016, 'A new metaheuristic for solving constrained engineering optimization problems: Crow Search Algorithm' was first presented to the literature by Askarzadeh (2016).Inspired by real-life crow behaviour, the algorithm aims to reach the solution faster by imitating the natural behaviour of crows.
Crows use various strategies to detect food, objects, or dangers in their environment.Circular flight, successive fast fluctuations, and so forth are the basic strategies of this algorithm.For example, the 'Crow's Nest' strategy, inspired by the circular flight of crows to explore regions in the solution space, is a product of the crows' nest-searching behaviour (Andic, 2023;Askarzadeh, 2016).
In the first step of the algorithm, a random location is determined from the solution space where the problem is started to be solved.After this step, different strategies such as 'Food Search', 'Crow's Nest', 'Group Hunt' and 'Escape' are realized (Andic, 2023;Askarzadeh, 2016).
The stage where the process of finding the best solution area by scanning the area is the food search stage.By finding the best solution area, it changes direction according to the best solution.The crow's nest phase involves circular flights to explore different areas in the solution area.
The group hunting strategy is the strategy that is designed as a result of the crows standing together and capturing the target.The strategy used The CSO steps for solving the anaemia classification problem are as follows.
Step 2 The initial parameter values in Table 5 are set.
Step 3 The chicken population is initialized from random values in the range 0 À 1 ½ and its size should be defined as N Â 24 ð Þ .Each row of this matrix, where j ¼ 1, 2, …,24 is the weight vector that will be used to emphasize the importance of the parameter values of the data as seen in Equation ( 7).
Step 4 To emphasize the importance of the parameter values of the data, the input value is multiplied by the weight vector.For the study, Step 5 To find the fitness values corresponding to each individual in the population, the MATLAB TreeBagger function is called as shown in Equation ( 9).Model ¼ TreeBagger nTrees,XTrain, yTrain, 0 Method 0 , 0 classification 0 Step 6 The error value resulting from the classification is given in Equation ( 10).The objective of the problem is to find the weight vector corresponding to the minimum y, where Found is the number of correct records in the test dataset and pTest is the number of records in the test dataset.This weight vector will be optimized with the CSO.
Step 7 The weight vector with the lowest error value (y) is found and stored.
Step 8 A hierarchical order is established by ranking the fitness values of the chickens.The swarm will then be divided into many groups.
Step 9 Depending on the value of i: a.The solution set for roosters is updated using Equation (2).b.The solution set for chickens is updated using Equation ( 5).c.The solution set of baby chickens is updated using Equation ( 6).
Step 10 If the result obtained is superior to the stored result, it will be updated.
Step 11 Double substitution mutation will be applied.
Step 12 The population will be optimized.
Step 13 Go back to step 5 until the iteration is complete.
Step 14 The best rooster solution will be found as a result.
to avoid negative outcomes in the optimization problem is the escape strategy.This algorithm produces faster and more accurate results than other optimization algorithms (Andic, 2023).Therefore, it is used in different fields.
The hierarchical structure of the CSA algorithm is given in Figure 3.
Taking N as the number of crows in a d-dimensional environment, the position of crow i.In the search space at tie itr is x i,itr vector.itr max is the maximum number of iterations.Crows have a memory where they memorize the location of their hiding places.m i,itr is the hiding place of crow i, and this location is the best position obtained by this crow.If the hiding place of crow j, m j,itr , is to be visited within the iteration, crow i follows crow j to get closer to it.Three situations arise at this stage.
In case 1, crow j does not know that crow i is following it and in this case, crow i approaches crow j's hiding place.The new position of crow i is found by the formula.
fl i,itr is the flight length of crow i.
In case 2, crow j knows that crow i is following him and to prevent his memory from being stolen, crow j deceives crow i by moving to another location.AP j,itr is the probability of awareness, and the two cases are expressed as follows.
x i,itrþ1 ¼ x i,itr þ r i Â fl i,itr Â m j,itr À x i,itr À Á , r j ≥ AP j,itr random location , otherwise In case 3, m i,itrþ1 is the hiding place of crow i and f is the objective function.The crows' memories are updated according to Equation (13).
T A B L E 8 Parameter weights (d) found by optimizing the TreeBagger method with CSO.
According to Equation ( 13), if the fitness value of the crow's new position is better than the fitness value of the memorized position, the crow's memory is updated according to the new position.This process continues until the termination criterion is met.CSA steps for solving the anaemia classification problem are given in Table 9.
The weight vector emphasizing the importance of the parameters in the classification result of the TreeBagger_CSA model proposed to solve the anaemia classification problem according to 2 different approaches is given in Table 10.
Looking at the weight vector corresponding to each parameter found by optimizing the TreeBagger method with CSA (TreeBagger_CSA) in Table 10, it is seen that the MCV parameter has the highest effect on the classification success, while the NE parameter has the lowest effect on the classification success.When we look at the weight vector corresponding to each parameter found by optimizing the TreeBagger method with CSA (TreeBagger_CSA_SMOTE) on the data set multiplexed with the SMOTE technique, it is seen that the EO, BA, PLT and MPV parameters have the highest effect on the classification success, while the LY, MO, MCV, MCHC and SDTSD parameters have the lowest effect on the classification.Thus, the effect of each parameter on the classification success was optimized with CSO and took values between 0 and 1.

| JAYA algorithm
Introduced in 2016 by Rao, the JAYA optimization algorithm is designed to create new individuals from the interaction of the best and worst individuals in the population, instead of the learning and teaching phases in the previously developed Learning Teaching based optimization algorithm (Ergun & Tayfun, 2020;Rao, 2016).
The JAYA method, which consists of a single stage and has a simple mathematical structure, is easy and fast to apply to problems due to its simple structure.It works faster and achieves results in a shorter time (Ergun & Tayfun, 2020;Rao, 2016).These features make the JAYA method superior to other population-based methods (Ergun & Tayfun, 2020).
In the first stage of the algorithm, random individuals are generated for the initial population.Using the objective function, the best and worst individuals are selected, and the individuals are renewed by interacting to move closer to the best individual and away from the worst individual.
For each renewed individual x new , the fitness value x old before renewal is compared with the fitness value x old before renewal to decide whether it should remain in the population.The steps continue until the stopping criterion is exhausted.New individuals are updated according to the equation with x best best solution, x worst worst solution, r 1 and r 2 being random values.
F I G U R E 3 Hierarchical system of the crow search.
Detailed information about JAYA can be found in the literature (Ergun & Tayfun, 2020;Rao, 2016).JAYA's steps for solving the anaemia classification problem are given in Table 11.
The weight vector of the TreeBagger_JAYA model proposed to solve the anaemia classification problem, which emphasizes the importance of the parameters in the classification result according to 2 different approaches, is given in Table 12.
Looking at the weight vector corresponding to each parameter found by optimizing the TreeBagger method with JAYA (TreeBagger_JAYA) in Table 12, it is seen that SD, PCT, MCV, MCH, FOLATE, FERRITE and B12 parameters have the highest effect on classification success, while RBC, PLT, PDW, NE, MPV, MCHC and HCT parameters have the lowest effect on classification success.When we look at the weight vector corresponding to each parameter found by optimizing the TreeBagger method with JAYA (TreeBagger_JAYA_SMOTE) on the data set multiplexed with the SMOTE technique, it is seen that the RBC and B12 parameters have the highest effect on the classification success, while the MCHC, MCH, LY, HGB and FOLATE parameters have the lowest effect on the classification.Thus, the effect of each parameter on the classification success was optimized with JAYA and took values between 0 and 1.

| EVALUATION
In this study, Tree Bager method and 3 different metaheuristics are hybridized to perform disease classification on a database consisting of 5 different classes: non-patient records, HGB-anaemia, iron deficiency anaemia, B12 deficiency anaemia and folate deficiency anaemia patient records.
While conducting experimental studies with the proposed hybrid models, 2 different approaches are presented.While the 1st approach consists of the analysis obtained by applying the proposed methods to the raw data set, the 2nd approach is formed by applying the proposed methods after data multiplexing with the SMOTE technique.ROC analysis metrics were used for performance evaluation.These metrics, which are frequently used in data mining applications, reveal how well the proposed models perform in predictions (Zweig & Campbell, 1993).The ROC The CSA steps for solving the anaemia classification problem are as follows.
Step 2 The initial parameter values in Table 5 are set.
Step 3 The location of a swarm of crows is initialized from random values in the range [0 À 1] and its size should be defined as N Â 24 ð Þ .Each row of this matrix, where j ¼ 1, 2, …,24. is the weight vector that will be used to emphasize the importance of the parameter values of the data as seen in Equation ( 14).
Step 4 To emphasize the importance of the parameter values of the data, the input value is multiplied by the weight vector.For the study, Step 5 To find the fitness values corresponding to each individual in the population, the MATLAB TreeBagger function is called as shown in Equation ( 16).Model ¼ TreeBagger nTrees,XTrain, yTrain, 0 Method 0 , Step 6 The error value resulting from the classification is given in Equation ( 17).The objective of the problem is to find the weight vector corresponding to the minimum y, where Found is the number of correct records in the test dataset and pTest is the number of records in the test dataset.This weight vector will be optimized with the CSA.
Step 7 The weight vector (crow position) with the lowest error value (y) is found and stored.
Step 8 A hierarchical order is established by ranking the fitness values of the chickens.The swarm will then be divided into many groups.An awareness probability and flight time parameters are defined.The position of the crow is evaluated.
Step 9 Randomly select crow( j) to follow.
Step 10 Two different situations arise in this step.a. Equation ( 11) is used if r j ≥ AP. b.Else, random location Step 11 According to the relevance values of the new locations, Equation ( 13) is used to decide whether the crow's memory should be updated according to the new location values.
Step 12 Go back to step 5 until the iteration is complete.
Step 13 The best crow position will be found as a result.
parameters used in the analysis are TP, TN, FP and FN.TP (True Positive) is the detection of a patient classified as sick as a result of the analysis, TN (True Negative) is the detection of a record classified as healthy as a result of the analysis.FP (False Positive) is the detection of a healthy record as a patient as a result of the analysis of the test results, and FN (False Negative) is the detection of a healthy record as a result of the analysis of the test results of the record detected as a patient.The study was performed on a system with Intel Core i5 11400F 2.6 GHz processor and 16 GB DDR4 memory.
Formulas for macro metrics that average the unweighted mean per label are given in Equations ( 23)-( 27).
In the equations, m refers to the macro metric and classes refer to = {non-patient records, HGB-anaemia, iron deficiency anaemia, B12 deficiency anaemia, folate deficiency anaemia}.The term TP c refers to the number of samples correctly classified as c.

| Experimental results of classical classification methods
Within the scope of the study, first, tests were performed with classical methods frequently used in the literature for the classification of anaemia and the results were analysed.The tests were performed using Matlab 'Classification Learner App'.As seen in Table 13, Gaussian NB, Kernel NB, Quadratic SVM, Cubic SVM, Fine k-NN, Medium k-NN, Coarse k-NN, and Cosine k-NN were used to classify the five-class data set.According to the table, the highest accuracy was obtained with Quadratic SVM at 95.2%.
Since records without anaemia are indicated by 'class 1', HGB-anaemic patients by 'class 2', iron deficiency anemia patients by 'class 3', B12 deficiency anaemia patients by 'class 4' and folate deficiency anaemia patients by 'class 5', the confusion matrices of the model results were analysed as shown in Figures 4-7 to evaluate the method results in detail.
Figure 4-While the overall accuracy of Model 1 is 81.5%, Figure 4 shows that the accuracy of the 1st class is 92.14%, 2nd class 21.9%, 3rd class 75.49%, 4th class 55% and 5th class 42%.This shows that the class accuracy for Model 1 is quite low in classes 2, 4, and 5.
According to Figure 4-Model 2, the overall accuracy of Model 2 is 87.9%, while Figure 4 shows that the accuracy of the 1st class is 92.06%, 2nd class is 73.5%, 3rd class is 86.7%, 4th class is 42.5% and 5th class is 33.87%.This shows that the class accuracy for Model 2 is quite low in the 4th and 5th classes.
According to Figure 5-Model 3, while the overall accuracy of Model 3 is 95.2%, the accuracy of the 1st class is 98.66%, 2nd class is 83.75%, 3rd class is 94.87%, 4th class is 55% and 5th class is 40.32%.This shows that the class accuracy for Model 3 is quite low in the 4th and 5th classes.
Figure 5-According to Model 4 While the overall accuracy of Model 4 is 94.4%, when Figure 5 is analysed, the accuracy of the 1st class is 97.94%, 2nd class is 79.15%, 3rd class is 94.69%, 4th class is 50% and 5th class is 41.93%.This shows that the class accuracy success for Model 4 is quite low in the 4th and 5th classes.
According to Figure 6-Model 5, while the overall accuracy of Model 5 is 82.0%, the accuracy of the 1st class is 92.42%, the 2nd class is 39.58%, the 3rd class is 75.21%, the 4th class is 10% and the 5th class is 16.13%.This shows that the class accuracy for Model 5 is quite low in classes 2, 4, and 5.
T A B L E 1 1 The JAYA steps for solving the anaemia classification problem are as follows.
Step 2 The initial parameter values in Table 5 are set.
Step 3 The initial population is initialized from random values in the range [0 À 1] and its size should be defined as N Â 24 ð Þ .Each row of this matrix, where j ¼ 1, 2, …,24 is the weight vector that will be used to emphasize the importance of the parameter values of the data as shown in Equation ( 19).
Step 4 To emphasize the importance of the parameter values of the data, the input value is multiplied by the weight vector.For the study, Step 5 To find the fitness values corresponding to each individual in the population, the MATLAB TreeBagger function is called as shown in Equation ( 21).
Step 6 The error value resulting from the classification is given in Equation ( 22).The objective of the problem is to find the weight vector corresponding to the minimum y, where Found is the number of correct records in the test dataset and pTest is the number of records in the test dataset.This weight vector will be optimized with JAYA.
Step 7 The weight vector with the lowest error value (y) (x best ) and the weight vector with the highest error value (x worst ) are found and stored.
Step 8 The weight vector according to the best and worst individual is renewed according to Equation ( 18).
Step 9 To decide whether the new individual should be added to the population, their fitness values are compared.If the fitness value of the new individual is smaller than the old individual, the new individual is added to the population.
Step 10 Go back to step 5 until the iteration is complete.
Step 11 The best individual (x best ) will be the result.
According to Figure 6-Model 6, while the overall accuracy of Model 6 is 85.5%, the accuracy of the 1st class is 97.87%, the 2nd class is 33.57%, the 3rd class is 77.73%, the 4th class is 7.5% and the 5th class is 4.84%.This shows that the class accuracy for Model 6 is quite low in the 2nd, 4th, and 5th classes.
Figure 7-According to Model 7 While the overall accuracy of Model 7 is 83.2%, Figure 7 shows that the accuracy of the 1st class is 98.82%, the 2nd class is 13.78%, the 3rd class is 72.6%, the 4th class is 0% and the 5th class is 0%.This shows that the class accuracy for Model 7 is very low for Class 2 and even no records are found in Classes 4 and 5.
Figure 7-According to Model 8 While the overall accuracy of Model 8 is 86.5%, when Figure 7 is analysed, the accuracy of the 1st class is 95.74%, the 2nd class is 41%, the 3rd class is 84.44%, the 4th class is 2.5% and the 5th class is 45%.This shows that the class accuracy success for Model 8 is quite low in the 2nd, 4th, and 5th classes.

| Experimental results of the TreeBagger method
In this section, the results are observed using the 1st approach Tree Bagger method and the 2nd approach Tree Bagger method to classify the anaemia dataset.The results obtained using the accuracy, macro-average precision, macro-average recall and macro-average F-score metrics are compared with the results obtained in the next section and with the results of studies in the literature for classifying the same problem.
The confusion matrices obtained as a result of the classification of the five-class data set used in the study with Tree Bagger according to the two approaches are shown in Figure 8. Table 14 presents the accuracy metrics of the classification results.
According to Figure 8a and Table 14, the success rates of TreeBagger_Model for classifying records in 1st, 2nd and 3rd grade are 100%, 97.4% and 99.6% respectively.However, the success rates for class 4 and class 5 records are 74.5% and 77.4% respectively.The TreeBagger  method outperformed the overall accuracy (Table 13) of other classical methods frequently used in the literature.Especially the accuracy of the 1st, 2nd and 3rd classes was found to be quite good.However, due to the low number of data in classes 4 and 5, the performance of these classes remained low.At the same time, TreeBagger_Model's low accuracy in a minority of classes but high overall accuracy is an indication of data imbalance.Figure 8b and Table 14 show that when the proposed methods are applied to the TreeBagger_Model_SMOTE model after the data multiplexing process, it is seen that the success in the 4th and 5th classes is improved by 100% and 99.5%.This eliminates the problem that the proposed methods learn better in classes with more data and learn less in classes with less data.

| Experimental results of the proposed hybrid models
In this section, the results of six hybrid models applied to 5 different classes to classify the anaemia dataset are observed according to two different approaches.Figure 9 shows the results of the confusion matrices of the proposed models according to the first approach.
According to the results of the TreeBagger_Model (Table 14), the overall accuracy was 99.15%, while this was increased to 99.57% by adding the SMOTE technique.When Table 15 is analysed, among the hybrid models proposed according to the first approach, this success is increased to 99.64% with the TreeBagger_JAYA model.
When the confusion matrices are examined and the model where only TreeBagger method is applied (TreeBagger_Model) (Figure 8a), the TreeBagger model where SMOTE technique is applied (TreeBagger_Model_SMOTE) (Figure 8b) are compared with the hybridized TreeBagger models in Figure 9, the classification success of hospital records diagnosed with non-anaemia, HGB-anaemia and IDA are 100%, 97.4% and 99.6% with TreeBagger_Model, 99.5%, 99.5% and 99.6% with TreeBagger_Model_SMOTE, and 100%, 99.6% and 99.7% with TreeBagger_JAYA In other words, according to the first approach, hospital records in classes 1, 2 and 3 are successfully classified by TreeBagger, TreeBagger with SMOTE and the three proposed hybrid methods.At the same time, the classification success of FDA and vitamin B12 deficiency classes, where the number of records is very low compared to other classes, is found to be 74.5% and 77.4% with TreeBagger_Model, 100% and 99.5% with Tre-eBagger_Model_SMOTE, and 85% and 92.5% with TreeBagger_JAYA, respectively, which is the most successful result among the proposed hybrid methods according to approach 1.Thus, the success in classifying the records diagnosed with FDA and vitamin B12 deficiency is increased by approximately 14.09% and 19.51% with TreeBagger_JAYA and 34.23% and 28.55% with TreeBagger_Model_SMOTE, respectively.
According to the results of TreeBagger_Model (Table 14), while the overall accuracy rate was 99.15%, this rate increased to 99.57% with the addition of SMOTE technique and to 99.64% with the TreeBagger_JAYA model proposed according to the first approach in Table 15.In Table 16, with the TreeBagger_CSA_SMOTE proposed according to the second approach, this success increased to 99.92%.By applying SMOTE technique to such TreeBagger, the success rate increased by 0.42%, by hybridizing the TreeBagger method according to the first approach, the success rate increased by 0.07%, and by hybridizing it according to the second approach, the success rate increased by 0.28%.T A B L E 1 5 According to approach 1, results of the proposed models.The confusion matrices were analysed and compared with Figure 8a for the model using only the TreeBagger method (TreeBagger_Model) (Figure 8a), Figure 8b for the TreeBagger model using the SMOTE (TreeBagger_Model_SMOTE) (Figure 8b), Figure 9 for the hybridized TreeBagger models according to approach 1 and Figure 10 for the hybridized TreeBagger models according to approach 2.
The classification success of hospital records diagnosed with non-anaemia, HGB-anaemia and IDA is 100%, 97.4% and 99.6% with Table 17 shows the running times of 8 different models proposed to solve the anaemia classification problem.According to the table, it is seen that as the number of data to which the models are applied increases, the running times also increase.According to the table, it is seen that TreeBagger_JAYA method, which gives successful results according to the 1st approach, runs longer than the other models modelled according to the 1st approach, and TreeBagger_CSA_SMOTE method, which gives successful results according to the 2nd approach, runs in a shorter time than the other models modelled according to the 2nd approach.

| DISCUSSION
The best success rate from all tests was obtained from the TreeBagger_CSA_SMOTE model with 99.92% accuracy, 99.61% F1-score, 99.94% recall, and 99.28% precision.The second-best performance is obtained by TreeBagger_JAYA_SMOTE with 99.89% accuracy, 99.34% macro average F1-score, 99.81% macro average recall, and 98.89% macro average precision.The most important reason for the success of the proposed methods is the strengthening of the classification process by emphasizing the importance of the parameters in the dataset and balancing the unbalanced dataset by applying the SMOTE technique.When the classification process was performed with classical methods, the best performance was achieved with Quadratic SVM with 95.4%.
Since the dataset used in the TreeBagger_CSO, TreeBagger_CSA and TreeBagger_JAYA models without SMOTE technique (approach 1) is unbalanced, F-Score, precision and recall metrics were analysed in addition to the accuracy metric to measure model success.Since the classification success in the minority class is critical, the F-Score indicates that the proposed methods classify the samples in the minority class with higher accuracy and lower misclassification rate.At the same time, a high recall value means that a large proportion of the instances in the minority class are correctly predicted, while a high precision value indicates that the predicted minority instances have a high probability of actually belonging to the minority class.Higher values for both precision and recall lead to a higher F-Score, indicating that there is not a big difference between precision and recall values.The 8% difference between 0.8978 recall and 0.9781 precision for TreeBagger_Model indicates that there is class imbalance in the dataset (Table 14).That is, the precision value of 0.9781 indicates how many of the minority samples labelled as sick are actually sick, while the recall value of 0.8978 indicates how many minority patients are correctly identified.Since the minority class has fewer samples, precision is higher than recall.The F-score value of 0.9321 means that a higher proportion of minority class samples are correctly classified and the misclassification rate is lower.In order to improve TreeBagger_Model with CSO, CSA and JAYA methods, the high precision, recall and f-score 4%.This is due to the fact that by obtaining the weight vector that emphasizes the importance of the parameters in the dataset, the parameters T A B L E 1 6 According to approach 2, results of the proposed models.The accuracy metrics of the best result obtained by Kilicarslan et al. are given in Table 18.
As seen in the table, a 98.5% accuracy value was found in the study conducted on the anaemia dataset.
As seen in Table 19, the results obtained with our proposed models have shown better performance.
In this study, TreeBagger_CSO, TreeBagger_CSA, and TreeBagger_JAYA, TreeBagger_CSO_SMOTE, TreeBagger_CSA_SMOTE and TreeBagger_JAYA_SMOTE hybrid models were used to develop a decision support system to accurately classify and diagnose anaemia and help physicians make decisions.was normalized by shrinking it between 0.1 and 0.9 to obtain more consistent results due to the large numerical difference between the parameter values.Then, 6 new hybrid methods were proposed to classify anaemia types by analysing the classification success of classical methods and the methods with successful results.During classification, the dataset was divided into 10 different subsets using 10-fold cross validation.SMOTE technique was applied to eliminate the imbalance in the dataset.Thus, in this process, each of the 10 subsets is set aside as a test set.The remaining 9 parts were subjected to data multiplexing according to the minority class using the SMOTE technique.Then, the performance of classical methods, 1st approach hybrid methods and 2nd approach hybrid methods were evaluated with accuracy, precision, recall and F-score metrics.
Due to the problems of low accuracy and poor classification of some classes as a result of the tests performed with classical methods, high performance was achieved with the proposed hybrid models compared to the 1st approach by better emphasizing the importance of the parameters with the proposed metaheuristics.Due to the differences between precision and recall metrics due to data imbalance, the 2nd approach is presented by performing data multiplexing operations.According to the 2nd approach, higher performance was achieved with the proposed hybrid models.To solve the multiclass anaemia problem, new hybrid methods have been proposed in the literature that can be applied to different problems in order to increase the class-based accuracy as well as the overall accuracy in the dataset with fuzzy logic-based parameter optimization.With the proposed methods, the TreeBagger method, which is a model formed by combining decision trees, is strengthened by combining it with metaheuristics.
As a result of the experimental studies, in the five-class anaemia dataset, the highest accuracy success according to the 1st approach was obtained with the TreeBagger_JAYA model with 99.641% and the highest accuracy success according to the 2nd approach was obtained with the TreeBagger_CSA_SMOTE model with 99.92%.At the same time, with the proposed models, the accuracy of FDA and B12 deficiency anaemia classes, which have low number of data records compared to the 1st approach, is increased by 14.09% and 19.51%, respectively, and approximately 16.8% on average.According to the 2nd approach, the accuracy of FDA and B12 deficiency anaemia classes with low number of data records is increased by 34.23% and 29.2%, respectively, and on average by approximately 31.72%.Thus, the SMOTE technique data multiplexing approach (approach 2) gave the best result by determining the coefficients to emphasize the importance of the parameters according to the fuzzy logic approach.
This study not only outperforms the accuracy of the study by Kılıçarslan et al. using the same dataset (Table 19), but also outperforms similar studies in the literature (Table 20) in which multiclass anaemia data were classified using different datasets.
The result of the study is expected to be helpful for medical students and doctors in predicting 5 different types of anaemia.We believe that the classifier performances of our proposed models will contribute positively to the literature.
explained as follows: In the model defined with TreeBagger_Model, only TreeBagger method is used.TreeBagger_CSO combines the TreeBagger method with the CSO method.With the TreeBagger_CSO_SMOTE model, TreeBagger and CSO methods are applied to the SMOTE dataset.
T A B L E 3 Number and proportions of data obtained on each fold during 10-fold.
Parameter weights d ð Þ found by optimizing the TreeBagger method with CSA.
Parameter weights d ð Þ found by optimizing the TreeBagger method with JAYA.

F
I G U R E 4 Confusion matrices for Model 1 and Model 2.

F
I G U R E 5 Confusion matrices for Model 3 and Model 4.

F
I G U R E 6 Confusion matrices for Model 5 and Model 6.

F
I G U R E 7 Confusion matrices for Model 7 and Model 8.

F
I G U R E 8 Confusion matrix resulting from classification with TreeBagger method; (a) the result of TreeBagger_Model; (b) the result of TreeBagger_Model_SMOTE. T A B L E 1 4 Results of the TreeBagger model.Confusion matrices for the three proposed hybrid methods according to the first approach; (a) confusion matrix of TreeBagger_CSO model; (b) confusion matrix of TreeBagger_CSA model; (c) confusion matrix of TreeBagger_JAYA model.
values obtained in the proposed TreeBagger_CSO, TreeBagger_CSA and TreeBagger_JAYA models show that the classification success increases by obtaining the weight vector to emphasize the importance of the parameters.The hybridization of the TreeBagger method with CSO, CSA and JAYA methods resulted in the highest accuracy with TreeBagger_JAYA.The recall values of 0.9479 for TreeBagger_CSO, 0.946 for TreeBagger_CSA and 0.954 for TreeBagger_JAYA show that the proposed models perform well in predicting minority classes, while the difference between the precision values of 0.9889 for TreeBagger_CSO, 0.985 for TreeBagger_CSA and 0.989 for TreeBagger_JAYA is reduced to about with high contribution to the classification process strengthen the classification process.This also led to an increase in the classification success of the minority classes.In order to further strengthen the classification process and eliminate data imbalance, new were obtained by applying the SMOTE technique.Recall values of 0.9988 for TreeBagger_CSO_SMOTE, 0.9992 for TreeBagger_CSA_SMOTE and 0.9989 for TreeBagger_JAYA_SMOTE and precision values of 0.9831 for TreeBagger_CSO_SMOTE, 0.9928 for TreeBagger_CSA_SMOTE and 0.9889 for TreeBagger_JAYA_SMOTE were obtained.The fact that the difference between precision and recall values is very low indicates that the data imbalance has been eliminated.With a score of 0.9961 and the minimum runtime, the TreeBagger_CSA_SMOTE method achieved the highest success.F I G U R E 1 0 Confusion matrices of the three proposed hybrid methods according to the second approach; (a) confusion matrix of TreeBagger_CSO_SMOTE model; (b) confusion matrix of TreeBagger_CSA_SMOTE model; (c) confusion matrix of TreeBagger_JAYA_SMOTE model.

Figure 11
Figure 11 shows the cost function for the three proposed hybrid methods.When the cost function is analysed, it is seen that the proposed TreeBagger_CSO model reaches the optimum result in the 7th iteration, TreeBagger_CSA model reaches the optimum result in the 13th iteration, TreeBagger_JAYA model reaches the optimum result in the 14th iteration, TreeBagger_CSO_SMOTE in the 6th iteration, TreeBagger_CSA_SMOTE in the 5th iteration, and TreeBagger_JAYA_SMOTE in the 5th iteration.
The cost function for the six proposed hybrid methods.T A B L E 1 8 The best result in the study by Kilicarslan et al. , 5 different anaemia types including non-patient records, HGB-anaemia, iron deficiency anaemia, B12 deficiency anaemia, and folate deficiency anaemia patient records are diagnosed and patient records contain 24 different attributes.The study by Kilicarslan et al. and the methods of similar studies in the literature were examined and an original study was conducted.Within the scope of the study, the dataset was used in the study by Kilicarslan et al. and obtained from Tokat Gaziosmanpas ¸a University Faculty of Medicine and includes the complete blood count results of 15,300 patients between 2013 and 2018.The data of children, pregnant women, and cancer patients were excluded from the study by Kilicarslan et al.The noise in the dataset was cleaned and the insignificant parameters and missing parameter records were removed.The dataset, which was cleaned of noise and made openly available in the Kaggle database, Anaemia dataset classes and proportions after SMOTE process.
T A B L E 5 Names and descriptions of the models used in the study.
Results of classical classification methods.
TreeBagger_Model, 99.5%, 99.5% and 99.6% with TreeBagger_Model_SMOTE, 100%, 99.6% and 99.7% with TreeBagger_JAYA, 99.9%, 99.9% and 99.9% with TreeBagger_CSA_SMOTE.In other words, hospital records in classes 1, 2 and 3 were successfully classified with TreeBagger_Model, TreeBagger_Model_SMOTE, TreeBagger_JAYA and TreeBagger_CSA_SMOTE.At the same time, the classification success of FDA and vitamin B12 deficiency classes, where the number of records is very low compared to other classes, is found to be 74.5% and 77.4% E 1 9 Comparison of our proposed model results with the results of Kilicarslan et al.Relevant studies similar to our study.