Where t represents a given node, i represents any
classification of labels, and p(i|t) represents the
proportion of label classification i in node t . Since the
effect of information entropy and Gini coefficient is the same in
practical application, information entropy is selected to calculate
impurities in the decision tree constructed in this study.
Random forest (RF) is a very representative bagged ensemble algorithm.
All its basic evaluators are decision trees, and the forest composed of
classification trees is the random forest classifier. Each decision tree
provides a different solution to the problem. The solutions of all the
decision trees are eventually combined (usually by voting or averaging)
into a single final model output [21], which is
usually a more stable and accurate prediction. In this study, the model
predicted whether a patient would die in hospital by providing the
probability of death for each patient. The probability is determined by
the ratio of the decision tree with positive results to the total number
of decision trees.
For the selection of feature variables, we adopted the feature
importance attribute of RF and LASSO regression. The feature importance
of RF indicates the contribution of each predictor to the model, so the
most relevant predictor can be selected to represent most of the
performance of the model. Least Absolute Shrinkage and Selection
Operator (LASSO) imposes a constraint on the sum of the absolute values
of the model parameters, applying a regularization process in which it
penalizes the coefficients of the regression variables and sets some of
them precisely to zero [22]. Variables with
non-zero results were selected as important variables.