scieee AI-readable full text Open interactive document viewer

Predicting hospital associated disability from imbalanced data using supervised learning

Saarela, Mirka,Ryynänen, Olli-Pekka,Äyrämö, Sami

Full text

This is a self-archived version of an original article. This version may differ from the original in pagination and typographic details. Author(s): Title: Year: Version: Copyright: Rights: Rights url: Please cite the original version: CC BY-NC-ND 4.0 https://creativecommons.org/licenses/by-nc-nd/4.0/ Predicting hospital associated disability from imbalanced data using supervised learning © 2018 Elsevier B.V. Accepted version (Final draft) Saarela, Mirka; Ryynänen, Olli-Pekka; Äyrämö, Sami Saarela, M., Ryynänen, O.-P., & Äyrämö, S. (2019). Predicting hospital associated disability from imbalanced data using supervised learning. Artificial Intelligence in Medicine, 95, 88-95. https://doi.org/10.1016/j.artmed.2018.09.004 2019 Predicting Hospital Associated Disability from Imbalanced Data Using Supervised Learning Mirka Saarelaa,∗, Olli-Pekka Ryyn¨ anenb,c, Sami ¨ Ayr¨ am¨ oa aUniversity of Jyvaskyla, Faculty of Information Technology, P.O. Box 35, FI-40014 University of Jyvaskyla, Finland bDepartment of Public Health and Clinical Nutrition, University of Eastern Finland, Kuopio, Finland cGeneral Practice Unit, Kuopio University Hospital, Primary Health Care, Kuopio, Finland Abstract Hospitalization of elderly patients can lead to serious adverse effects on their functional capability. Identifying the underlying factors leading to such adverse effects is an active area of medical research. The purpose of the current paper is to show the potential of artificial intelligence in the form of machine learning to complement the existing medical research. This is accomplished by studying the outcome of hospitalization of elderly patients as a supervised learning task. A rich set of features characterizing the medical and social situation of elderly patients is leveraged and using confusion matrices, association rule mining, and two different classes of supervised learning algorithms, it is shown that the need for help and supervision are the most important features predicting whether these patients will return home after hospitalization. Such findings can help to improve hospitalization and rehabilitation of elderly patients. Keywords: Hospital Associated Disability, Machine Learning, Random Forest 1. Introduction Basic activities of daily living (short ADLs) are fundamental to ensure that older people are able to live independently without care. These ADLs include activities such as bathing, dressing, using a toilet, and eating. Hospitalization of previously independent older patients due to an acute medical illness often leads to a situation in which the patients find themselves unable to perform one of these activities independently anymore [1]. Consequently, they cannot return to their old lives but are dependent on help also after their stay at the hospital. This undesirable side-effect is called hospital associated disability (HAD). HAD is associated with the advent of serious adverse events, such as mortality, morbidity, institutionalization and re-hospitalizations, affecting both the individuals (reduced quality of life or even death) and the society (e.g., higher use of caregivers and other resources, greater health care expenditure). It can be actuated although the illness that necessitated the hospitalization was successfully treated [2,3,4] and although the patients admission diagnosis was not related to a decline in ∗Corresponding author. Email address: [email protected] (Mirka Saarela) ADLs [5]. Saltvedt et al. [6] showed that geriatric evaluation and management units where older patients are encouraged to participate in ADLs during hospitalization significantly reduce mortality of the patients. However, according to Covinsky et al. [7], approximately one-third of elderly patients have an ADL disability that they did not have before the hospitalization. Thus, HAD is a serious problem and understanding the most important factors leading to it could help the elderly and save many resources. The purpose of this paper is to find accurate prediction methods for the outcome of hospitalization of elderly patients and to recognize the strongest factors predicting HAD. Earlier studies have pointed out that high age, comorbid disease, depression, cognitive impairment, limited social support and physical frailty can cause HAD [1,2,7,8]. Table 1provides an overview of previous studies concerned with predicting HAD. It summarizes for all of these studies the analyzed data, used methods, and main findings. As can be seen from the table, all of the existing studies used linear techniques originating from statistics such as t-tests, χ2 tests, or logistic regression. However, comparative research on supervised learning algorithms has shown that linear methods such as Preprint submitted to Artificial Intelligence in Medicine May 22, 2019 logistic regression are not competitive with and constantly outperformed by more complex and nonparametric methods such as random forest [9,10,11]. Random forest has been a preferred choice especially in many medical applications because it not only shows very good prediction performance but is also known for its ability to identify important variables [12]. This ability to identify important variables is generally a crucial property for health care applications as it increases the interpretability of the models, which helps medical decision makers to understand and use these models as clinical decision support [13,14]. Another reason why random forest may be advantageous is that it has proved to be more robust toward imbalanced data. This is important here because—as in many other, particularly medicine related, applications—our real world data set is imbalanced and misclassifying a minority class observation is more serious than misclassifying a majority class observation. Hence, our analysis adds to the existing studies in two respects. First, we use random forest to automatically learn a model that best fits the data. We show that this model outperforms the logistic regression model. Second, we use methodological triangulation of different analysis techniques to improve the technical soundness of the presented approaches [15]. This triangulated analysis gives more confidence on our final conclusion that previously estimated needs for help and supervision are the most important predictors for HAD. 2. Data The data was prospectively collected from four national hospitals in Finland located in Helsinki, Joensuu, Jyv¨ askyl¨ a and Kuopio. Only patients who arrived from home, that is, not the ones who became sick while they were already in hospital, were included in the study. Moreover, to be included in the data collection patients had to be 65 years old or older, and had to be admitted from home to a hospital due to an acute illness or sudden worsening of a chronic illness. A total of 835 patients who fulfilled these inclusion criteria was included in the study. The outcome of hospitalization was defined (i) as the categorical variable discharge to home,institutionalized, or dead, and (ii) simply as binary variable distinguishing discharge to home or institutionalized or dead. For three cases in our data the dependent variable was missing. Since we needed the information of hospitalization outcome in all our analysis techniques those three cases were deleted. The patients who did not return home were designated to be the cohort of interest (i.e., the ones with HAD). Thus, the distribution of patients with HAD in the data set was very similar to the general occurrences of HAD estimated by Covinsky et al. [7]. One third (i.e., 285) of the patients in our dataset were either institutionalized or dead, exactly as the estimated occurrence of HAD (see Section 1). 2.1. Features The collected data features 100 variables, two dependent and 98 independent features related to the patients health and social status. 92 of the 98 original features are categorical. The majority of these features are ordinal (Likert-scale) such as walking stairs that has the categories without difficulty,with help, and not at all. However, there are also some purely categorical variables in the collected data, such as gender and location. All original variables were transformed into numerical features, either real-valued or binary ones. Moreover, as described more detailed below, the absence of a value was encoded with a separate category for each variable because it can provide valuable information. For some of our analysis techniques (see Section 3) we need our whole data in binary format. For this, we categorized the six non-categorical features (age, hemoglobin, white blood cell count, glucose level, sodium level, potassium level) and one-hot encoded all variables with an additional variable indicating the missing information. This led to a target data with 381 features. Removal of constant features left us with 332 binary features. 2.2. Missing data Altogether, our dataset has less than 3% of missing data. However, 53% of the variables are incomplete. These missing values occur in 701 (84%) of the observations. That means that for only 16% of the patients we have values for all variables. Furthermore, the missing data are not evenly distributed variablewise. On the one hand, a lot of features have only a couple (less than four) or no missing values. On the other hand, a few features have many missing values. One example of the latter case is the glucose level, which has more than 50% missing values. The absence of a glucose level for a patient in our data set usually indicates that based on previous examinations the value was assumed to be within the normal range. That means that some features in our data are reported only for certain patients with certain conditions and the occurrence of a missing value is actually related to the reason why it is missing. Thus, the data are missing not at random (MNAR) [20]. To deal with the MNAR sparsity pattern we encoded for each feature that had missing values a new category 2 Table 1: Related work Authors Data Method Main findings Zisberg et al. [16] 684 patients aged 70 or older of two Israeli tertiary medical centers correlation analysis, path analysis Mobility inside the hospital, continence care, and length of stay were associated with HAD. Lees et al. [17] 257 patients aged 65-80 undergoing emergency general surgery at the University of Alberta Hospital in Canada logistic regression Elderly patients discharged to home after hospitalization were younger, had fewer inhospital complications and lower American Society of Anesthesiologists class. Covinsky et al. [2] 2293 patients aged 70 or older from University Hospitals of Cleveland, USA in Ohio, USA χ2tests and logistic regression The oldest patients were the most likely to develop a HAD. Gill et al. [1] 754 community-living persons aged 70 years or older who were nondisabled at baseline, in New Haven, Connecticut, USA confidence intervals, Cox model Hospitalization of the elderly was strongly associated with loss of an ADL, especially for frail individuals. Carlson et al. [18] 122 patients aged 60 or older of an acute care geriatric inpatient unit of university hospital in Texas, USA t-test, χ2tests, logistic regression Poor functional homeostasis was significantly associated with HAD independently of other patient’s characteristics. Wu et al. [19] 804 patients aged 80 years or older who stayed in a USA hospital (Beth Israel Hospital, Boston; Metro- Health Medical Center, Cleveland; Marshfield Clinic/St. Joseph’s Hospital, Marshfield; University of California Los Angeles Medical Center, Los Angeles) at least 48 hours ordinal logistic regression models The strongest independent predictor of HAD was the ADL score at baseline. For patients independent in ADLs at baseline, the presence of an orthopedic diagnosis was associated with poorer subsequent function. However, for patients with four or more ADL dependencies at baseline, orthopedic diagnoses was not independently associated with HAD. Inouye et al. [5] 188 patients aged 70 or older admitted to the medicine service at Yale-New Haven hospital, USA t-test, χ2tests, proportional hazards model The risk of functional decline in ADLs increased linearly with the number of risk factors, suggesting that the predisposition to functional decline may result from the cumulative effects of multiple impairments. indicating the missing information. This strategy was chosen for two reasons. First, it ensures that we do not need imputation, which is difficult or even impossible with a MNAR pattern. Second, missingness patterns might reveal interesting information itself. For example, as explained above, the glucose level was collected and reported mainly for patients with non-normal levels. Hence, the missingness of the patient’s glucose level is an indicator that this level was in normal range. Moreover, as illustrated in Figure 1the distribution of discharged to home patients is different for missing values (i.e., when there are missing values, less patients are discharged to home than usually). We do not want to delete this information but uncover it in case it is related to the outcome of hospitalization. Hence, for each variable with missing values a new category indicating the availability of this features was created. 2.3. Class imbalance Another challenge of our data set is the class imbalance of the collected data. In various application areas—especially medicine—the class of interest (e.g., patient having a disease) is underrepresented in the data while the majority of the data represent the control cases. Classifiers built on such imbalanced data often are biased toward the majority class [21]. As in many real medical data sets we have less cases of the class of interest (i.e., one third of the patients belong to the HAD class) than control cases (i.e., the class of return home patients). This means that the trivial classifier that sim- 3 (a) Distribution of the fracture variable. (b) Distribution of the vomiting variable. (c) Distribution of the need for help variable. (d) Distribution of the pain variable. Figure 1: Distribution of discharged to home patients for selected variables. The missing values (denoted as −1) appear more often with patients that were not discharged to home. ply assigns every patient to the most common (returning home) class would achieve an accuracy of 66% while having 0% sensitivity. The class imbalance also means that we cannot evaluate our classification models based on the accuracy. Thus, instead of concentrating on a high accuracy we compare our classification models based on the area under the ROC curve (AUC). The AUC is more independent of class skew because it measures the ranking abilities of the classifier. It is equivalent to the probability that the classifier will rank a randomly selected positive observation (in our case, HAD patient) higher than a randomly selected negative observation (i.e., a returning home patient in our case). Hence, an AUC value around 0.5 is no better than random guessing while an AUC of 1 presents perfect classification. To deal with the class imbalance problem in classification different procedures have been introduced (for a recent review see Vanhoeyveld and Martens [22] and references therein). These procedures can mainly be divided into procedures that operate on the classification algorithm (cost-sensitive methods) and procedures that operate on the data (sampling methods). Cost-sensitive methods assign larger weights to observations of the minority class. As a consequence, minority class misclassification is more costly which impedes the trivial systematic classification to the majority class. Sampling methods modify the training set by sampling a smaller majority training set (undersampling) or repeating observations from the minority training set (oversampling). A popular sampling technique of the latter case is synthetic minority oversampling (SMOTE) [23]. SMOTE creates observations that are synthetic interpolations of 4 the minority class. This produces clusters around each observation from the minority class instead of simply duplicating observations (such as the random oversampling method does). In a recent study by Bach et al. [24], different solutions to deal with imbalanced data were compared in the context of medicine (i.e., prediction of osteoporosis). They experimented with different classifiers and procedures to cope with their imbalanced data and showed that oversampling the minority (i.e., osteoporosis) class using SMOTE resulted in higher AUC values for all tested classifiers. Liu et al. [25] introduced the EasyEnsemble method. The EasyEnsemble method samples from the training set as many observations from the majority class as there are observations from the minority class in the training set. This procedure is repeated until each majority class observation is sampled into one training set. Then, each balanced training set is used to train the classifier and the outputs of those learners are combined for the prediction. This method was tested on classification tasks for imbalanced data sets and found to outperform other sampling techniques by Vanhoeyveld and Martens [22]. 3. Methods Our analysis was based on a combination of different data mining and machine learning techniques [26], all with the goal to find the most important predictor for HAD from the data: •Confusion matrix to identify the single variables that predict HAD the best •Association rule mining to determine interesting patterns in the data that co-occur (i) with HAD patients and (ii) with the patients that return home •Supervised learning to (i) find the model that predict HAD the best using all information from the data including the missingness information and (ii) identify the features most useful for the supervised models utilizing feature importance measures 3.1. Direct effect of single variables using confusion matrices First, we determined the importance of the 332 binary features originating from the one-hot-encoding described in Section 2. For each of these features, we computed the confusion matrix of this single feature with the dependent variable institutionalized or dead. We then used the formula for accuracy (i.e., the sum of true positives and true negatives divided by the number of observations) to determine the importance of the variables. All variables that had a higher accuracy than the default classifier that always predicts the most common class (i.e., discharge to home) and is right in 66% (546 out of 832) of the cases, were considered to be informative. 3.2. Association rule mining Second, we used association rule mining to automatically detect what patterns and if-then rules could be found in the binarized data. In association rule mining, these pattern and rules are usually represented in forms of implication rules [26,27]. If Iis the set of all items and Sma subset of I(Sm⊆I) then a transaction ti∈T, where Tdenotes the set of all transactions, is said to contain Smif Smis a subset of ti. The number of all transactions of a dataset that contain a particular itemset is its support count. It is defined as σ(Sm)=|{ti|Sm⊆ti,ti∈T}|, where |·|stands for the number of elements in a set. An association rule is an implication expression of the form Sm→Sn, where Sm,Sn⊆Iand Sm∩Sn=∅. The goodness of such a rule is typically assessed by its support and confidence. The support determines how often a rule is applicable to a given data set. It is defined as s(Sm→Sn)=σ(Sm∪Sn) |T|. The confidence assesses how frequently items in Snappear in transactions that contain Smand is defined as c(Sm→Sn)=σ(Sm∪Sn) σ(Sm). 3.3. Supervised learning using logistic regression and random forest Third, we wanted to predict HAD using supervised learning. As identified in Table 1, logistic regression seems to be still the standard technique to predict HAD. We believe that this due to two reasons. First, logistic regression is known for its straightforward interpretability [13,14], which is a property that is (as discussed in Section 1) of great importance in medical applications. Second, logistic regression is probably the most established multivariate prediction technique for binary outcomes in statistics. Our other supervised learning technique is random forest. Previous research has highlighted the great potential of random forest for biomedical applications [28,29]. They are one of the best state-of-art classifiers known in machine learning and require only very little parameter tuning [30,31]. Moreover, random forests are often preferred choices in biomedical applications because of their embedded feature importance measure which facilitates interpretability [12]. For example, as 5 recently shown by Masetic and Subasi [28], random forest not only proved to be the best classifier detecting congestive heart failure but at the same time expressed also useful medical knowledge. Another advantage of random forests is their suitability for imbalanced data sets as described above. Random forest classifiers seem to be more robust to such imbalanced data because they have a method for balancing error [30]. Khoshgoftaar et al. [32] compared different classifiers (na¨ ıve bayes, support vector machines, k nearest neighbors, decision tree) on benchmark datasets with imbalanced class distributions. They concluded that random forest works best for imbalanced data. Similarly, Khalilia et al. [29] pointed out the advantages of random forest for imbalanced data. Random forests are ensemble learners based on decision trees that overcome the disadvantages of decision trees while virtually keeping their main advantages [33]. Decision tree classifiers build a hierarchical tree-like structure of the training data where every node represents one feature test condition and every directed edge represents one decision. At each node, they split the data so that each partition has a purer class distribution. This purity of class distribution is usually estimated by the Gini index. The Gini index of a data partition Xis defined as G(X)=1− C X i=1 P(ci|X)2,(1) where Cdenotes the number of classes and P(ci|X)the probability of class ciin X[34]. A Gini index value of zero is gained if all observations in a data partition belong to the same class (the probability of that class is 1 while the probability of all other classes is 0), while larger values indicate less pure class divisions. Thus, at each node the selected split is the one with the lowest Gini index. Decision trees handle high-dimensional data well and are—although nonlinear—highly amenable to human model interpretation as they provide understandable rules on the splitting attributes. A further strong point of decision trees is their ability to handle mixed data types such as categorical and continuous features. However, if fully grown, they are prone to overfitting (i.e., suffer from high variance) and thus often lead to reduced prediction performance on the test set. While a single decision tree is highly prone to overfitting, the average of a multitude of uncorrelated trees is not [30]. Consequently, a random forest classifier solves the overfitting problem of single fully grown decision trees by bagging many of such trees and introducing two sources of randomness: (i) randomness in the data and (ii) randomness in the features. Bagging is a process in which each decision tree is constructed from a bootstrap sample drawn from the original data set and the prediction of a new observation is made by taking the mode (average in case of regression) of all trees. Thus, randomness in the data is the result of bagging since the bootstrap samples ensure that the trees in the forest are built on different training sets. Randomness in the features is the result of considering for each split of a decision tree only a small number of features q, with qbeing a user defined parameter and typically much smaller than the total number of features p(default p=√q). If many trees were trained on the same data and if all features were considered in each split, the trees of such a forest were strongly correlated or even duplicates of each other. However, the trees of a random forest are not correlated since each tree in the random forest model is grown on a different set of data and considers only a subset of the features as splitting attributes on each node. Hence, the random forest leads to improved performance because it decreases the variance (overfitting) of the model without increasing the bias. As such, they are frequently the winning classifiers in machine learning competitions [9,10]. 4. Results Below we report the results of our different analysis techniques outlined in Section 3. As explained we were not only interested in a prediction model with high performance but also in finding most explanatory variables expressing what characteristics of elderly patients are associated with so permanent adverse effects on functionality that they cannot be discharged anymore, but need long-term care or even die after being hospitalized for reason of acute illness. Thus, we also discuss for each technique the most important predictors. All experiments were implemented in Python 3.6.2 (using scikit- and imbalanced-learn packages) and Matlab R2016b for association rule mining. 4.1. Direct effect of single variables using confusion matrices All informative predictor variables (i.e., features that provide a clearer distribution than the default) are listed in Table 2. As can be seen from the table, 56 out of the 332 features were identified to be more informative than the default predictor and the need for supervision was the most important variable with a prediction accuracy of 67% (560 out of 832 cases). 6 Table 2: List of one-hot encoded features that were more accurate in prediction than the default classifier that always predicts the most common class and is correct in 546 out of 832 (66%) of the cases. correctly correctly variable name classified variable name classified need for supervision 2.0 560 pain nan 559 remembering new things 3.0 559 need for help nan 558 confusion 3.0 556 eating 2.0 555 need for help how often 2.0 555 mobility aids nan 554 falling 3.0 551 shakiness 3.0 551 confusion 4.0 551 mobility aids 4.0 551 living before admission nan 550 alzheimer 2.0 550 depression 2.0 550 mobility aids 5.0 550 confusion 2.0 550 mental disorder 2.0 550 psychosis 2.0 549 need for help 4.0 548 underweight 2.0 548 arthralgia nan 548 heartburn nan 548 stroke 3.0 548 walking stairs nan 548 need for supervsion nan 548 alcohol 2.0 548 numbing of bag nan 548 back pain nan 547 oedema nan 547 dyspnoea in strain nan 547 dyspnoea in rest nan 547 excema nan 547 constipation nan 547 dizziness nan 547 falling nan 547 shakiness nan 547 stroke nan 547 speak difficulty 3.0 547 speak difficulty nan 547 walking room 3.0 547 walking room nan 547 walking outside 4.0 547 walking outside nan 547 walking and carrying bag nan 547 using toilet nan 547 finger dexterity nan 547 washing nan 547 cutting toe nails nan 547 eating nan 547 mobility aids 2.3 547 need for supervsion 1.0 547 multimorbidity binary 2.0 547 delusions 2.0 547 gastrointestinal symptoms nan 547 loss of balance nan 547 4.2. Association rules Our goal with the second technique was to find rules of strongly associated features in our data that indicate that a patient is in risk to be institutionalized or die. Since only one third of the observations in our data actually contain patients that died or were institutionalized, we started with a relatively small value for the support but the highest value for the confidence to achieve reliable and accurate rules. Table 3shows the result when setting the support to 0.6 and searching for rules with HAD on the right hand side of the rule with as high confidence as possible. The first rule that we obtained with this strategy had a confidence of 100%. All patients that needed help one to five times a week and for which pain was missing, were institutionalized or died (see rule number 1 in Table 3). Similarly, all underweight patients for whom the need for help was missing were institutionalized or died (rule 2 in Table 3). The following rules did not have full confidence but a higher support. More than 64% of those patients with Parkinson who needed help one to five times a week (1.1% of the data) were institutionalized or died (rule 3). As already detected with confusion matrices, the need for help appeared again to be a good indicator for HAD. More than half of the patients who needed help one to five times a week (21.3% of all patients in the data) were institutionalized or died (rule 8). This percentage is even higher if the patient lived alone before admission to the hospital (rule 7). The alone (living) situation in combination with the need for help is also reflected by rule 4 and 5. If the patient is single or a widow(er) and he or she needs help or suffers from confusion, HAD is more likely. If we search for interesting rules with home at the right hand side, we obtain rule 9 stating that if a patient does not need help (note both binarized categories of help demand variables measure the same), he or she will probably (confidence more than 93%) return home. In summary, association rule mining reflected the importance of the variables that measure the amount of help the elderly patients needed already before hospitalization. If a patient did not need help or supervision, he or she will probably return home. If a patient needed some help, it is likely that he or she will be institutionalized or die after hospitalization. This is especially true if the patient is alone (i.e., lives alone and/or is single or widowed). 7 Table 3: Association rules having HAD (rule 1-8) and home (rule 9) on the right hand side. nr rule support confidence 1{pain: missing, need for help: 1-5 times a week}→{HAD}0.6% 100% 2{need for help: missing, underweight: yes }→{HAD}0.6% 100% 3{Parkinson: yes, need for help: 1-5 times a week}→{HAD}1.1% 64.3% 4{marital status: single, need for help: 1-5 times a week}→{HAD}1.1% 60% 5{marital status: widowed, confusion: every other day}→{HAD}0.7% 60% 6{pain: missing, walking and carrying bag: can but its difficult without help}→{HAD}4.7% 59.1% 7{living before admission: alone, need for help: 1-5 times a week}→{HAD}14.3% 52% 8{need for help: 1-5 times a week}→{HAD}21.3% 51% 9{need for help: no, need for help how often: no need}⇒{home }10% 93.2% 4.3. Supervised learning We finalized our triangulated analysis by predicting HAD using supervised learning. As pointed out in the introduction, we were especially interested in the performance of the random forest classifier in comparison to the logistic regression classifier because this appears to be the main (exclusive) classification model in medical research to predict HAD (see Table 1). In order to assess the performance of the different models the data set was split into training (70%) and test set (30%). Grid-search hyperparameter optimization with 10-fold cross-validation was used to evaluate the individual models on the training set. The final model using the best performing combination of hyperparameters was then refit on the full training data set and the performance was evaluated on the independent test set. The test set was untouched during the entire training and model selection process and only used for the final model evaluation. Therefore, it was ensured that no information of the test set was revealed during model training and parameter optimization. As discussed above our data is challenging because of the missing data and the class imbalance. To find what works best for our classification problem and our algorithms we experimented with all strategies discussed in Section 2: the cost-sensitive procedure (using balanced class weights in the classification algorithm), different sampling of the training data (i.e., random oversampling, SMOTE, random undersampling, and EasyEnsemble), and none for comparison. A random forest with 1000 estimators1and Gini impurity (see 1) as splitting criterion was used. The maximum number of features was grid searched. For logistic 1In the beginning, the number of trees was also grid searched. However, more trees were always better and we observed that after 1000 trees there was no gain in performance anymore but a longer computation time. regression the best penalty and regularization parameter were grid searched. Moreover, we searched for the best dimension reduction (principal component analysis, non-negative matrix factorization, or none) and best scaling (standardization, min-max-scaling, or none). Table 4shows the experimental results. Pipelines were used in combination with the grid search to chain the preprocessing (scaling and dimension reduction) steps together with the classifiers and to ensure that no information from the test set was leaked into the training set. That means that we encapsulated all steps in a single estimator and automatically tried all possible combinations of the specified preprocessings and classifier parameters without touching the test set. Thus, the final parameters and preprocessing reported in the table and applied to the test set correspond to the ones returned by scikit-learn’s pipeline and grid search (i.e., best params from the GridSearchCV). The different preprocessings tested for our models gave consistently the same result. The random forest models performed the best with no preprocessing (no scaling and no dimension reduction) and the logistic regression with standard scaling and no dimension reduction (see column best preprocessing in Table 4). Similarly, there was only little difference between the tested configurations regarding the grid searched values of hyperparameters (see column best parameters in Table 4). For example, for all random forest models we obtained the best results when only a small number of maximum features were considered at each split (i.e., the best value for qin our random forest models always was either 3 or 4, see rows 1–6 in Table 4). We further observed that our logistic regression models always performed better with L2 than with L1 regularization (see rows 7–12 in Table 4). Although L1 regularization could probably lead to better model interpretability by zeroing weights (pruning variables) with higher probability than L2 regularization, the results indicate that the 8