## 2 Materials and Methods
### Machine Learning  
Our dataset was organized and divided into two parts for training and testing the model, with 80% and 20% of the data, respectively. We developed an HF patients' mortality prediction model using seven commonly used machine-learning algorithms. The selected machine-learning algorithms include GaussianNB, AdaBoost, Bagging, Gradient Boosting, MLP Classifier, LightGBM, and XGBoost. All data-mining tasks were performed using the Python programming language. GaussianNB is a probabilistic classification technique commonly used in machine learning. It assumes that each feature or predictor has an independent ability to predict the output variable [25]. By combining the predictions of all features, the algorithm assigns a probability of the dependent variable belonging to each group. The final classification is determined by selecting the group with the highest probability. MLP Classifier (Multilayer Perceptron) is a feed-forward artificial neural network that consists of multiple layers of interconnected neurons. It learns and predicts data using principles inspired by the human nervous system. MLPs are suitable for tasks involving classification and prediction with various feature sets [26]. In our study, the MLP neural network had five layers, namely an input layer, three hidden layers, and an output layer. Each hidden layer had 13 neuron nodes. We used regular activation functions and Adam optimizers for training and weight optimization. The normalization parameter was set to \(10^{-5}\). The five methods that follow are also integral to ensemble learning, a technique that combines multiple models to improve predictive performance and robustness. AdaBoost is an adaptive ensemble learning method that focuses on misclassified samples from previous classifiers. It is sensitive to noisy and outlier data [27]. The algorithm trains a base classifier and assigns higher weights to incorrectly classified samples. This process is iterated with subsequent classifiers. The iterations continue until a stopping condition is met or the error rate becomes sufficiently small. In our implementation using the Python scikit-learn library, we set the maximum number of iterations to 50, while keeping other hyperparameters at their default values. Bagging, also known as bootstrap aggregating, is an ensemble-learning algorithm widely used in machine learning. It aims to improve accuracy and stability, while reducing variance and overfitting by combining multiple predictors [28]. In our implementation using the Python scikit-learn library, we constructed an ensemble classifier consisting of 500 DecisionTreeClassifiers. Each classifier was trained on a maximum subset of 100 samples obtained through bootstrapping, where sampling is performed with replacement. We used default values for other hyperparameters. Gradient Boosting is another ensemble-learning algorithm that can enhance the accuracy of different classification models. It utilizes the negative gradient information of the model's loss function to train models with poor predictive accuracy [29]. These trained models are then accumulated to obtain the final predictive model. Gradient Boosting has been widely used for feature selection, classification, and regression tasks. LightGBM is a Gradient Boosting framework that utilizes an improved histogram algorithm. It divides continuous feature values into K intervals and selects split points from these intervals, significantly accelerating prediction speed and reducing memory consumption, without sacrificing prediction accuracy [30]. LightGBM has been widely applied for feature selection, classification, and regression tasks. Notable techniques used in LightGBM include Gradient-Based One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB). In our study, GOSS retained features with high gradients while randomly sampling features with low gradients to maintain consistency with the original feature distribution. EFB was used to bundle mutually exclusive features and reduce the number of features.