{'fraction_non_alphanumeric': 0.030509377258721042, 'fraction_numerical': 0.015102522159242212, 'mean_word_length': 4.919387525332132, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Machine learning‐based decision tree classifier for the diagnosis of progressive supranuclear palsy and corticobasal degeneration

Abstract Aims This study aimed to clarify the different topographical distribution of tau pathology between progressive supranuclear palsy (PSP) and corticobasal degeneration (CBD) and establish a machine learning‐based decision tree classifier. Methods Paraffin‐embedded sections of the temporal cortex, motor cortex, caudate nucleus, globus pallidus, subthalamic nucleus, substantia nigra, red nucleus, and midbrain tectum from 1020 PSP and 199 CBD cases were assessed by phospho‐tau immunohistochemistry. The severity of tau lesions (i.e., neurofibrillary tangle, coiled body, tufted astrocyte or astrocytic plaque, and tau threads) was semi‐quantitatively scored in each region. Hierarchical cluster analysis was performed using tau pathology scores. A decision tree classifier was made with tau pathology scores using 914 cases. Cross‐validation was done using 305 cases. An additional ten cases were used for a validation study. Results Cluster analysis displayed two distinct clusters; the first cluster included only CBD, and the other cluster included all PSP and six CBD cases. We built a decision tree, which used only seven decision nodes. The scores of tau threads in the caudate nucleus were the most decisive factor for predicting CBD. In a cross‐validation, 302 out of 305 cases were correctly diagnosed. In the pilot validation study, three investigators made a correct diagnosis in all cases using the decision tree. Conclusion Regardless of the morphology of astrocytic tau lesions, semi‐quantitative tau pathology scores in select brain regions are sufficient to distinguish PSP and CBD. The decision tree simplifies neuropathologic differential diagnosis of PSP and CBD.

diagnosis of tauopathy challenging; thus, autopsy is indispensable to confirm a diagnosis.
PSP and CBD show similar tau pathology characterised by numerous neuronal and glial lesions composed of pathological aggregates of insoluble tau protein in the grey and white matter of the neocortex, basal ganglia, diencephalon and brainstem. [5][6][7] Neuronal loss and atrophy in the subthalamic nucleus, red nucleus and cerebellar dentate nucleus are more frequent and severe in PSP compared to CBD. [5] While tau pathology occurs predominantly in hindbrain structures in PSP, tau pathology in CBD occurs predominantly in forebrain structures. [8,9] The distinct morphology of astrocytic lesions is also helpful in distinguishing two diseases. [5,10] The tufted astrocyte is characteristic for PSP: a radial arrangement of thin, long, branching accumulation of tau in the proximal processes of astrocyte. [6,7] The astrocytic plaque is a pathognomonic lesion in CBD and is an annular cluster of short and stubby processes of astrocytes. [5] Even though the two diseases have different distributions and morphologic features of tau pathology, the neuropathologic diagnosis of PSP and CBD is sometimes challenging because the distribution pattern of neurodegeneration and tau lesions overlap. [7,9,11,12] With advances in machine learning, the application of computeraided diagnosis is a promising technology to assist diagnostic decisionmaking. [13,14] Several machine learning methods based on deep learning, such as image classification and object detection, have been applied in the fields of radiology, pathology and other specialties [15][16][17][18][19][20]; however, due to the "black box" nature of deep learning, it is difficult to interpret the results from deep learning, which may limit their use in decision-making in clinical practice. [21] A decision tree is a promising method to overcome this problem. [22] A decision tree is a machine learning method that separates outcomes based on the statistical significance, displayed as a probability tree. A recent study has shown that a machine learning-based decision tree using CSF biomarkers showed a higher diagnostic accuracy of Alzheimer's disease (AD) compared with a traditional cut-off. [23] The advantage of this technique is the "white box" nature; clinicians are able to interpret the output of the machine learning algorithm and use the results as a flowchart.
The present study aimed to demonstrate that the topographical distribution and severity of tau pathology, rather than the morphology of astrocytic tau lesions or other pathological features, are sufficient to distinguish between PSP and CBD. To achieve this, we performed hierarchical cluster analysis using semi-quantitative scores of tau lesions in select brain regions from PSP and CBD. In addition, we constructed machine learning-based decision tree classifiers to identify the most decisive predictive factor and provide a simple flowchart for diagnosis.

Case selection and ethical approval
All brain tissues used in this study were from the Mayo Clinic brain bank collected between 2000 and January 2020. In this period, 1411 cases and 261 cases have been given a neuropathologic diagnosis of PSP and CBD respectively. Cases with known MAPT mutations were excluded. Any case with missing data for at least one neuroanatomical region for a given tau pathology score were excluded from the study. The remaining 1219 cases, consisting of 1020 PSP and 199 CBD, were included in the study. For the validation study, 10 consecutive cases of either PSP or CBD between June and August 2020 were selected. Demographic information and clinical diagnoses were extracted from medical records and a questionnaire filled out by a family member. Clinical diagnoses of all cases were divided into three categories: RS, CBS and others (i.e., PSP-parkinsonism, frontotemporal dementia, AD, dementia with Lewy bodies, aphasia and PSP-pure akinesia with gait freezing) based on available clinical information. [2,4] Brain autopsies were performed after consent of the legal next-of-kin or individuals with power-of-attorney to grant consent. De-identified studies of autopsy samples are considered exempt from human subject research by the Mayo Clinic Institutional Review Board.

Neuropathologic assessment
Formalin-fixed brains underwent systematic and standardised sampling with neuropathologic evaluation by a single, experienced neuropathologist (DWD). Regions sampled on all cases included six regions of neocortex, two levels of hippocampus, a basal forebrain section that includes amygdala, lentiform nucleus and hypothalamus, anterior corpus striatum, thalamus at the level of the subthalamic nucleus, midbrain, pons, medulla and two sections of cerebellum, one including the dentate nucleus. Paraffin-embedded 5μm thick sections mounted on glass slides were stained with haematoxylin and eosin and thioflavin S. Braak neurofibrillary tangle (NFT) stage and Thal amyloid phase were assigned based upon lesion density and distribution with thioflavin S fluorescent microscopy according to published criteria. [24,25] For Braak NFT stage, sections from the entorhinal cortex (stage II), the pyramidal layer of the CA1 subsector of the hippocampus (stage III), temporal cortex (stage IV), frontal cortex (stage V) and primary visual cortex (stage VI) were used. For Thal amyloid phase, sections from the frontal cortex (phase 1), the pyramidal layer of the CA1 subsector of the hippocampus (phase 2), putamen (phase 3), CA4 subsector of the hippocampus (phase 4) and the molecular layer of the cerebellum (phase 5) were used. The neuropathological diagnosis of AD was based on the consensus criteria for the neuropathologic diagnosis of AD. [26] Immunohistochemistry for phospho-tau (CP13, Ser202, mouse monoclonal, 1:1000, from the late Dr Peter Davies, Feinstein Institute, North Shore Hospital, NY) was performed using a DAKO Autostainer (Universal Staining System, Carpinteria, CA) to establish a neuropathological diagnosis of PSP and CBD. [5][6][7] The severity of tau pathology, which included NFTs (including pretangles), coiled bodies, astrocytic lesions (including tufted astrocytes and astrocytic plaques) and tau threads, was graded semi-quantitatively on a four-point scale (0 = absent, 1 = mild, 2 = moderate, 3 = severe) by an experienced neuropathologist (DWD) in eight brain regions: | temporal cortex, motor cortex, caudate nucleus, globus pallidus, subthalamic nucleus, red nucleus, substantia nigra and midbrain tectum. Representative images of tau pathology scores in each lesion type are shown in Figure 1.

Hierarchical cluster analysis
Hierarchical cluster analysis using Euclidean distance and average linkage clustering was performed on patients and region-specific variables reflecting the tau pathology scores in eight brain regions in 1219 cases. A heatmap was generated to visualise hierarchical clustering using the "pheatmap package" in R 3.4.3 (The R Foundation for Statistical Computing, Vienna, Austria).

F I G U R E 1
Representative images of tau pathology scores in CP13immunostained slides. Images of NFT, tau threads and astrocytic plaques are from the motor cortex in CBD cases. Images of tufted astrocytes are from the caudate nucleus, and images of coiled bodies are from the motor cortex in PSP cases. All images are the same magnification. Scale bar =100 μm Machine learning-based decision tree classifier A decision tree classifier was created using the "scikit-learn" Python module. [27] Classification and regression tree algorithm and Gini impurity measure were used to construct decision trees. A total of 1219 cases were randomly divided into a training set (914 cases; 75%) and a testing set (305 cases; 25%). The target variable was the pathological diagnosis (i.e., PSP and CBD). The dependent variables were the tau pathology scores in eight brain regions.

Validation study
For further validation of the decision tree, three investigators (SK, XZ and DWD), who have different levels of experience in neuropathologic research in tauopathy, blindly assessed tau pathology scores of select brain regions in ten most recent cases of either PSP or CBD (validation set). For scoring, each investigator separately reviewed glass slides under a microscope, rather than using digital images. The diagnosis of PSP or CBD was made based only on the tau pathology scores and the decision tree classifier.

Statistical analysis
All statistical analyses were performed using R 3.4.3. Fisher's exact test was performed for group comparisons of categorical data, as appropriate. Mann-Whitney rank sum test and student t-test were used for analyses of continuous variables as appropriate. p-values < 0.05 were considered statistically significant.

Cohort summary
The demographic and clinicopathologic features of 1020 PSP and 199 CBD cases are summarised in Table 1. Patients with PSP were significantly older than those with CBD (75 ± 8 vs. 70 ± 8 years; p < 0.001). Although the frequency of concurrent neuropathologic diagnosis of AD was not significantly different in PSP and CBD (10% vs. 6%; p = 0.076), the medians of Braak NFT stage (2.5 vs. 2; p = 0.002) and Thal amyloid phase (1 vs. 0; p ≤ 0.001) were significantly higher in PSP than in CBD. The symptomatic duration of PSP was longer than that of CBD (7 vs. 6 years; p < 0.001). The majority of PSP patients (82%) were given a clinical diagnosis of RS, followed by CBS (8%). In contrast, the clinical diagnosis of CBD was more heterogeneous: CBS in 37%, RS in 36% and others in 28%.

Hierarchical cluster analysis
Hierarchical cluster analysis based on regional semi-quantitative tau pathology scores in 1020 PSP and 199 CBD cases were performed. The results are shown as a heatmap in Figure 2. This heatmap indicates tau pathology scores from white (score =0) to red (score =3). Each row represents the lesion types in a given brain region, and each column represents an individual case. The first cluster contained only CBD cases (Cluster 1), while the second one contained all PSP cases and six CBD cases (Cluster 2). This indicates that PSP and CBD were clearly separated based on the severity and distribution of tau pathology. For further analysis, Cluster 2 was subdivided into four clusters (2-1, 2-2, 2-3 and 2-4). Some striking differences in the distribution of tau pathology were observed between the clusters. Astrocytic tau lesions in the midbrain tectum and coiled bodies in the globus pallidus, subthalamic nucleus, red nucleus and midbrain tectum were less severe in Cluster 1 than Cluster 2. NFT and tau threads in the caudate nucleus were more severe in Cluster 1 than Cluster 2. Coiled bodies, tau threads, NFT and astrocytic tau lesions in the temporal cortex were more severe in Cluster 1 than Cluster 2, except Cluster 2-2.
Astrocytic tau lesions in the globus pallidus, substantia nigra, subthalamic nucleus and red nucleus were much less severe in Cluster 1 than Cluster 2, except Cluster 2-4. Cluster 2-2 had a higher burden of tau pathology in the temporal cortex than other clusters (i.e., Data are displayed as n (%), mean ± SD and median (25th, 75th range).  was significantly older, the frequency of AD (53%) was significantly higher and the frequency of clinical diagnosis of RS (69%) was significantly lower than other clusters. The breakdown of other clinical diagnoses is given in Table S1.
Six autopsy-confirmed CBD cases were included in Cluster 2: two cases in Cluster 2-1, two cases in Cluster 2-2, and two cases in Cluster 2-4. Clinicopathologic features are shown in Table S2. Although they were included in the PSP-predominant cluster, all cases had astrocytic plaques, confirming the neuropathologic diagnosis of CBD ( Figure S2). Cases in Cluster 2-1 and cluster 2-4 were characterised by less severe tau pathologies in the temporal cortex, while cases in Cluster 2-2 were characterised by more severe tau pathologies in the midbrain tectum ( Figure S2). Four of them were clinically diagnosed with CBS, and the other two were diagnosed with PSP-RS.

Decision tree classifiers
The cluster analysis showed that several tau pathology scores, such as the tau threads in the caudate nucleus, can help distinguish F I G U R E 2 Heatmap and hierarchical clustering based on tau pathology in 1020 PSP and 199 CBD cases. The heatmap reflects the severity of tau pathology, and a colour scale is given at the top right. Each tau lesion type in a brain region is represented with rows, and each case is represented with columns. Two distinct clusters are identified by hierarchical clustering. The left cluster (Cluster 1) mainly contains CBD cases as shown in orange in the pathology label, while the right cluster (Cluster 2) mainly contains PSP cases as shown in blue in the pathology label. Data are displayed as n (%), mean ± SD and median (25th, 75th range). When only one decision node was used to construct a tree (depth of the tree =1), a score of tau threads in the caudate nucleus showed the highest accuracy. As shown in Figure 3A,  To improve the diagnostic accuracy of decision tree classifiers, we increased the number of decision nodes by increasing the maximum depth of decision trees. Figure 3B shows a decision tree with a depth of 3, which contained 7 decision nodes. The root node used the score of tau threads in the caudate nucleus. Most PSP cases had a score of <3, so they selected the "True" path. In the second layer, the decision node asked whether the coiled body score in the subthalamic nucleus was 0. The majority of PSP cases had coiled bodies in this region, so they chose the "False" path. In the third layer, the decision node determined whether the coiled body score in the red nucleus was 0. Almost all PSP cases had coiled bodies in this region, so they chose the "False" path and arrived at the leaf node as a PSP (719 PSP and 1 CBD). This is the main pathway for most PSP cases.
When the coiled bodies score was 0 in the subthalamic nucleus in the second layer, then the node in the third layer asked whether the score of tau threads in the globus pallidus. The diagnosis of PSP was made if the score was lower than 2, and the diagnosis of CBD was made if the score was 2 or 3. The majority of CBD cases (and a few PSP cases) selected the "False" path at the root node because almost all CBD cases had a score of 3 for the tau threads in the caudate nucleus. In the second layer, the majority of CBD cases answered "True" at the decision node, asking whether a score 0 for astrocytic tau in the red nucleus. Finally, these cases were asked whether having a coiled body score of <3 in the midbrain tectum. Most CBD cases selected the "True" path and arrived at the leaf node as a CBD class. If the score of astrocytic tau in the red nucleus was higher than 0 in the second layer, then the next node asked the score of NFT in the caudate nucleus. The diagnosis of PSP was made if the score was lower than 3, and the diagnosis of CBD was made if the score was 3. As shown in Figure 3B, 903 out of 914 cases in a training set were correctly categorised as PSP or CBD (98.8% accuracy).
In cross-validation, this decision tree correctly classified 302 out of 305 cases in a testing set (99.0% accuracy).
As maximum depth increases, both training and testing scores increased. The decision tree achieved the best testing score of 0.997 when the maximum depth was 6 (data not shown).

Validation study
For further validation of the decision tree, three investigators blindly assessed the tau pathology scores and made a diagnosis in 10 cases using a flowchart created by the diagnostic tree classifier (Figure 4).
All the scores in six brain regions and final diagnoses are shown in

Decision trees without the subthalamic nucleus or caudate nucleus
Given the fact that all brain regions we used in the study might not be routinely sampled in other research laboratories, we also built decision tree classifiers without the subthalamic nucleus or caudate nucleus. Without the subthalamic nucleus, the scores of NFT in the caudate nucleus were used instead of coiled bodies in the subthalamic nucleus ( Figure S3A). The testing score of this decision tree with a depth of 3 was 0.987, slightly lower than that of the decision tree that used the subthalamic nucleus. When the caudate nucleus was excluded from the decision tree, the root node used the scores of coiled bodies in the midbrain tectum ( Figure S3B). The testing score of this decision tree with a depth of 3 was 0.964, lower than that of the previous two decision trees. Training and testing scores of these two decision trees in each maximum depth are given in Table S3.

DISCUSS ION
The first aim of the present study was to investigate whether the distribution and severity of tau pathology are sufficient to distinguish PSP and CBD, regardless of the morphology of astrocytic tau lesions. We used a score of astrocytic tau lesions for both tufted astrocytes in PSP and astrocytic plaques in CBD; therefore, the morphology of astrocytic tau lesions was not taken into account for the clustering. Nevertheless, the two diseases were almost entirely separated into two clusters, indicating that besides morphology, distribution patterns of tau pathology are distinct between the two diseases. This result also indicates that the information about neuronal loss and gliosis were not necessary to distinguish the two diseases.
Using this finding, a second aim of the present study was to develop decision tree classifiers to differentiate PSP and CBD using the tau pathology scores in select brain regions. As we expected from the heatmap finding, several tau pathology scores were sufficient to distinguish these diseases.
Although the heatmap visualised different distribution of tau pathology between the two diseases and we could observe some differential features, the decision tree was helpful to identify the parameters that contributed to classifying the two diseases. [22] Surprisingly, when only one variable was selected (tau threads in the caudate nucleus), the testing score was 0.977. This indicates that the score of tau threads in the caudate nucleus is the strongest predictor for diagnosing CBD. The diagnostic criteria of CBD stated that "the neuropathologic diagnosis of CBD is based upon detection of tau-positive neuronal and glial lesions, in particular astrocytic plaques and thread-like processes in grey and white matter, in a characteristic distribution". [5] The results of our study propose that the high burden of tau threads in the caudate nucleus has the highest value in the differential diagnosis of CBD and PSP, followed by the paucity of astrocytic tau lesions in the red nucleus in CBD.

F I G U R E 4
Diagnostic flowchart for PSP and CBD based on the decision tree classifier. Values indicate semi-quantitative tau pathology scores (0 = none; 1 = mild; 2= moderate; 3 = severe). *This class indicates PSP at 80% accuracy, so also consider CBD. **This class indicates CBD at 67% accuracy, so also consider PSP. Abbreviations: Caudate, caudate nucleus; GP, globus pallidus; MBT, midbrain tectum; NFT, neurofibrillary tangle; RN, red nucleus; STN, subthalamic nucleus Table 3 shows that the decision tree achieved the best testing score when the maximum depth was 6; however, we did not show this decision tree as the main result of this study because it is too complicated for practical use. This decision tree consisted of 6 layers and 16 decision nodes, using the tau pathology scores from the caudate nucleus, subthalamic nucleus, red nucleus, globus pallidus, midbrain tectum, substantia nigra, temporal cortex and motor cortex. Although the testing score was slightly lower, we propose that a decision tree with a depth of 3 is helpful for decision-making for pathologic diagnosis of PSP and CBD.
To determine whether this decision tree is useful in decisionmaking, we performed a validation study using ten additional cases.
Three investigators blindly assessed tau-immunostained slides in select brain regions without any clinical or other pathological information. Morphology of astrocytic tau lesions was not considered; only the semi-quantitative tau scores were used to make a diagnosis. Although there was some discrepancy in scores, all cases were correctly diagnosed as either PSP or CBD by all three investigators who have varying experience in diagnostic neuropathology.
Although the size of the validation set is relatively small, this result indicates that the decision tree classifier in the present study has sufficient accuracy for making a diagnosis of PSP and CBD.
In addition to the main decision tree, as shown in Figure 4, we also created two decision trees, which do not include the subthalamic nucleus or caudate nucleus because these brain regions might not be routinely sampled in some brain banks. As we expected, the decision tree without the subthalamic nucleus showed a similar testing score because the most important region, the caudate nucleus, including digital imaging analysis and machine learning-based object detection. [17,19] As the validation study showed, however, the decision tree seems robust against some discrepancy of the scores due to the combination of multiple decision nodes. Another potential limitation is that tau pathology scores were made based on immunohistochemistry with CP13 antibody, which is less widely used compared to AT8. We believe, however, that the difference between CP13 and AT8 does not affect the result because both antibodies show similar staining patterns in PSP and CBD. [35] In addition, we also compared CP13-and AT8-stained slides using the sections of caudate nucleus in PSP and CBD, which were indistinguishable ( Figure S1). Therefore, our decision tree classifiers can be used for AT8-immunostained slides. Finally, our decision tree classifiers can be used only for the dichotomy of PSP and CBD. In a practical setting, not only PSP and CBD, but other 4-repeat tauopathies, such as globular glial tauopathy and tauopathies due to MAPT mutations, might be raised in the differential diagnosis. [36,37] Patients with MAPT mutations have an unusual distribution pattern of tau pathology; thus, they may fit neither PSP nor CBD. [38] Future studies need to include these diseases and concurrent pathologies to develop more practical and versatile machine learning-based diagnostic algorithms.
Conversely, a strength of this study is the large sample size of both PSP and CBD cases. The Mayo Clinic brain bank in Florida has a focus on a wide range of neurodegenerative disorders, as well as normal and pathological aging. PSP and CBD cases include not only advanced disease, but also preclinical and earlystages. The decision tree classifiers were made using cases with a wide range of severity. Thus, we think our decision tree classifiers can be applied more widely by investigators using their case material.
In conclusion, the present study indicates that the semiquantitative scores of tau pathology in select brain regions are sufficient to distinguish PSP and CBD, regardless of the morphology of astrocytic tau lesions. The burden of tau-positive tau threads in the caudate nucleus is the most decisive predictive factor for the diagnosis of CBD. The diagnostic flowchart created by a machine learning-based decision tree classifier can be readily used by neuropathologists, which may assist decision-making in the neuropathologic diagnosis of PSP and CBD.

AUTH O R CO NTR I B UTI O N S
Shunsuke Koga contributed to study concept and design; acquisition, analysis and interpretation of data; drafting of manuscript; execution of the statistical analysis and machine learning; writing of the first draft. Xiaolai Zhou contributed to acquisition, analysis and interpretation of data; review and critique. Dennis W. Dickson contributed to study concept and design; acquisition and interpretation of data; review and critique.

E TH I C A L S TATEM ENT
Brain autopsies were obtained after consent of the legal next-of-kin or individuals with legal authority to grant autopsy permission. Deidentified studies of autopsy samples are considered exempt from human subject research by the Mayo Clinic Institutional Review Board.

DATA AVA I L A B I L I T Y S TAT E M E N T
The data that support the findings of this study are available from the corresponding author upon reasonable request.