## 3 Results
### Cross-Validation Techniques  
We used 5-fold cross-validation (CV) to validate the models. We created a confusion chart to compare the predicted outcomes with the observed ones. Figure 3A-C show the confusion charts for each classifier. Rows represent the true classes, and columns represent the predicted classes of the five LMNB1 morphologies (0, 1, 2, 3, 4). The diagonal squares show the intersection of true class and predicted class, e.g., the correct predictions. The off-diagonal squares show the incorrect predictions. White squares indicate zeros. The classification tree (Figure 3A) only worked well for Classes 0 and 1 and performed sub optimally for all other classes. We calculated the sensitivity, specificity and F1 score (see Materials and Methods). Although very similar, the tree ensemble yields the best results, therefore, we chose this classifier for further analysis. A closer look at the data shows that the five classes are highly unbalanced (Table 1) with Class 1 being the most represented, followed by Classes 0 and 2. Classes 3 and 4 are the sparsest. This explains why all the classifiers consistently performed poorly for Classes 3 and 4. To handle this class imbalance, we used RUSBoost, an algorithm that uses a combination of random under-sampling (RUS), as well as AdaBoost, in order to better predict the less represented classes. Figure 4A shows the performance of the classification ensemble using RUSBoost. Although the use of RUSBoost reduces the F1 score (compare Figure 3C with Figure 4A), it largely improves the prediction for Class 3, one of the least-represented ones (Figure 4A). Since we wanted to obtain a more balanced accuracy across classes, we used RUSBoost with all the following models presented in this paper. In order to reduce class imbalance, we merged the five original categories into three larger classes, according to morphological similarities described by [PERSON] et al. [22]: Class 1: formed by former Categories 0 and 1; Class 2: formed by former Category 2; Class 3: formed by former Category 3 and 4. We applied the same model to these three larger classes; the results are shown in Figure 5B. The F1 score increases sharply, and the model performs well for Classes 1 and 3, but not for Class 2. Figure 2: Flow chart of the experimental design. To classify astrocytes’ morphology, we compared three classifier algorithms; we used methods to address class imbalance like RUSBoost and cost sensitive error functions. We also used four types of cross-validation. All the models in this figure were cross-validated with five-fold cross-validation. Usually, machine learning algorithms are optimized for binary decisions, rather than multiple class decisions. However, for multiclass problems, we decided to test a technique called \"one vs. all\" (also known as \"one vs. the rest\"), where a separate binary classifier is trained for each class to predict whether an example belongs to that class or not. This can lead to improved performance compared to using a single multiclass classifier [28]. One vs. all (also known as \"one vs. the rest\") is a technique used for multiclass classification problems, where a separate binary classifier is trained for each class to predict whether an example belongs to that class or not. The class that is predicted by the classifier with the highest confidence score is the final prediction. This method is based on the idea that a good classifier for a problem with multiple classes should be able to separate each class from the rest of the classes. By training a separate classifier for each class, the one vs. all method attempts to achieve this goal. To assign the decision to one class, we determined the  
Figure 3: Confusion charts of three learners: classification tree (**A**), Treebagger (**B**), tree ensemble (**C**). Se = sensitivity, Sp = specificity, F1 = F score. All the models in this figure were cross-validated with 5-fold cross-validation.