## 2 Materials and Methods
We limited ourselves to three basic methods: functional segments [17], Juhl-Frost [18], and Nakahara [19]:

\[ppoFEV1_{FC}=FEV1\bigg{(}1-\frac{LUI}{LV}\bigg{)}[\%], \tag{6}\]

where \(LU\) is the number of functional lung segments removed and \(LV\) is the total number of functional lung segments,

\[ppoFEV1_{Juhl-Frost}=FEV1\bigg{(}1-S.\frac{5.26}{100}\bigg{)}[\%], \tag{7}\]

where \(S\) is the number of lung segments removed,

\[ppoFEV1_{Nakahara}=FEV1\bigg{(}1-\frac{n-a}{42-a}\bigg{)}[\%], \tag{8}\]

where \(n\) is the number of resected sub-segments in the lobe, that is, 6, 4, and 12 for the right upper, middle, and lower lobe and 10 for the left upper and lower lobe, while \(a\) is the number of sub-segments obstructed by the tumor. ### Selection of Base and Meta-Models

Base models can be of different types and architectures, such as decision trees, random forests, support vector machines, neural networks, etc., [14; 15; 20]. The criterion for choosing base models depends on several factors:

_Diversity:_ It's essential to choose base models that have different strengths and weaknesses. Models that make different types of errors or have varying biases can complement each other in the ensemble, leading to improved overall performance. Figure 2: Box plots of preoperative and postoperative FEV1 in [%] measured at 1 th, 4 th, and 7 th day after surgery. _Performance:_ While diversity is important, base models should still demonstrate reasonable predictive performance on their own. Models that perform well individually are more likely to contribute positively to the ensemble. _Computational efficiency:_ Depending on the size of the data and available computing resources, the computational cost of training and forecasting with underlying models should be considered. The criterion for choosing the meta-model includes [15; 20]:

_Performance:_ The meta-model should be chosen based on its ability to effectively combine the predictions from the base models. Common meta-models include linear regression, logistic regression, or more complex models like random forest or gradient boosting machines. _Complexity:_ Simpler meta-models are preferred over complex ones, as they are less prone to overfitting and can generalize better on new data. _Interpretability:_ Depending on the application, interpretability might be important. If the interpretability of the final model is a requirement, a meta-model that is more transparent and provides insights into how the ensemble makes predictions should be selected. Taking into account the amount of our training data, as well as the choice of SHAP as an agnostic method for interpretation, the dominant criteria was reduced to diversity and performance for base models and performance for meta-models. We have included 12 basic models in the wider list: Lasso (Least absolute shrinkage and selection operator) [21], Extra Tree (Extremely randomized Trees) [22], Random Forest [23], LightGBM (A Highly efficient gradient boosting decision tree) [24], SVM (Support Vector Machine) for regression, [25], in two variants SVM Linear and SVM.RBF with linear and radial bases kernel, respectively, AdaBoost [26], KNN (K Neighbors Regressor), [27], MLP (Multi-Layer Perceptron), [28], with two variants of architecture (MLP1-three layer architecture, MLP2-two layer architecture), Ridge Regression, [29], XGBoost (eXtreme Gradient Boosting), [30] and LogisticReg (Logistic Regression) [31]. We chose Random Forest as the output meta-model, due to its good generalization properties and ability to model a wide class of nonlinear mappings. In addition, Random Forest has an advantage over a similar class of models, such as LightGMB, AdaBoost, and XGBoost, primarily in terms of robustness to the selection of initial parameters and the built-in bootstrapping mechanism. These advantages are important in the case of very short training sets. Furthermore, compared to Extreme Trees, Random Forest demonstrates superior precision in selecting subsets of features during the node-splitting process of growing individual trees.