Interpretable Machine Learning Classifiers for Brain Tumour Survival Prediction

Prediction of survival in patients diagnosed with a brain tumour is challenging because of heterogeneous tumour behaviours and responses to treatment. Better estimations of prognosis would support treatment planning and patient support. Advances in machine learning have informed development of clinical predictive models, but their integration into clinical practice is almost non-existent. One reasons for this is the lack of interpretability of models. In this paper, we use a novel brain tumour dataset to compare two interpretable rule list models against popular machine learning approaches for brain tumour survival prediction. All models are quantitatively evaluated using standard performance metrics. The rule lists are also qualitatively assessed for their interpretability and clinical utility. The interpretability of the black box machine learning models is evaluated using two post-hoc explanation techniques, LIME and SHAP. Our results show that the rule lists were only slightly outperformed by the black box models. We demonstrate that rule list algorithms produced simple decision lists that align with clinical expertise. By comparison, post-hoc interpretability methods applied to black box models may produce unreliable explanations of local model predictions. Model interpretability is essential for understanding differences in predictive performance and for integration into clinical practice.

Introduction
Glioblastomas (GBM) are the most common malignant brain tumour and have the poorest outcomes. Average survival is 12-18 months and the 5-year survival rate is less than 5% [1]. Lower grade gliomas have an average survival of 7 years, but ultimately most progress to GBM and death [2]. An accurate prediction of prognosis for patients would inform treatment planning and patient support, but this is challenging. Various factors impact prognosis, but the precise contribution of each factor, and combination of factors to outcomes appears to vary between patients.
At the group level, basic statistical models are well-established in brain tumour survival analysis, but patient level survival prediction remains a challenge, possibly because of the well described biological heterogeneity of the disease and of treatment responses. Several survival studies have used the Cox proportional hazards (Cox PH) model [3], a popular survival model in statistics, to identify relevant clinical features for the construction of a brain tumour nomogram [4,5,6,7] which graphically depict a statistical model to be used to estimate individualised cancer prognosis [8]. However, simple multivariable regression techniques are ineffective at identifying novel informative patterns from data [9], so machine learning (ML) approaches are increasingly being explored in brain tumour survival analyses [10,11] (see also Kourou et al. [12] and Wang et al. [13] for general reviews). Such studies often use genetic or imaging data, with complex black box models to make prognostic predictions. In clinical practice this type of data is seldom, hence these models are of little use. Fulop et al. [14] used a large clinical and molecular brain tumour dataset to predict 400-, 900-and greater than 900-day survival after surgery using several ML methods.
The authors found that a neural network model performed the best with an accuracy of 59%. Furthermore, the authors used LIME [15] to understand the main drivers behind the wrong predictions and emphasized the importance of model interpretability for clinical decision-making. Senders et al. [16] recently used demographic, socioeconomic, clinical, and radiographic features for the creation of an online calculator for the prediction of glioblastoma survival. The authors compared 15 ML and statistical algorithms and an Accelerated Failure Time [17] algorithm was selected. However, a follow-up Letter to the Editor in the same journal [18] noted inconsistencies in the model calculations and highlighted the danger of non-healthcare professionals accessing this online resource which may provide misleading information. Although ML can be used to build predictive models with superior performance and generalisability [13,19], the implementation of such models in a clinical setting can come with safety, legal and ethical considerations. In healthcare, there is a desire for interpretable and explainable AI/ML models to give end users (e.g. clinicians) the support that will allow them to accept or reject predictions, thus enabling them to make informed judgements when it comes to high-stake medical decisions (see Ahmad et al. [20] and Holzinger et al. [21] for reviews on interpretable ML in healthcare).
There is no all-purpose definition of interpretability since this is a subjective concept that is often domain-specific [22,23]. One way to define interpretability is as the degree to which a human can understand the cause of a decision [24].
Thus a model M 1 may be considered more interpretable than a model M 2 if M 1 's decisions are easier to comprehend than those of M 2 [25]. Interpretability may be achieved by either using an intrinsically interpretable model whereby its simple structure allows end-users to understand feature relationships and final predictions, or by applying post-hoc explanation techniques to analyse and extract information from a trained model [26]. Most ML models are not originally designed to be interpretable and advancement in ML performance has led to the belief in a model's accuracy-interpretability trade-off [22]. However, interpretability may be used as a tool to improve accuracy [25] and models with interpretability constraints have already been shown to perform on par with unconstrained models across several healthcare domains [27,28,29].
In this paper we explore the use of Bayesian Rule Lists (BRL) [30] and Falling Rule Lists (FRL) [31] as two types of intrinsically interpretable ML models and apply them to the prediction of patient survival using a novel brain tumour dataset. Both models combine pre-mined frequent patterns from the dataset into a decision list using Bayesian statistics [30]. The FRL model is an extension of the BRL algorithm which produces an ordered decision list whereby the estimated probability of success decreases down the list [31]. The BRL and FRL algorithms are compared to a baseline Cox PH model and popular black box models by looking at the prediction for brain tumour survival. To represent the class of black box methods, we chose random forest (RF) [32], logistic regression (LR) [33] and support vector machine (SVM) [34], each of which have varying degrees of interpretability. Finally, in an attempt to understand the decisions made by non-transparent models, post-hoc interpretability methods LIME (Local Interpretable Model-Agnostic Explanations) [15] and SHAP (SHapley Additive exPlanations) [35] are applied to the black box models. For a given instance (e.g. patient), the explanations produced by the post-hoc methods are compared between the three ML models.
The remainder of this paper is organised as follows: In Section 2 we introduce both the raw and final dataset and the required preprocessing techniques; Section 3 outlines model construction; in Section 4 we report the model's quantitative and qualitative results; in Section 5 we analyse and discuss the results and Section 6 closes with final conclusions.

The Raw Dataset
This paper explores an anonymised hospital-based brain tumour dataset collected from routine electronic healthcare data of patients who presented to 4 regional neuro-oncology teams in the UK with a brain tumour diagnosis. Initially, the dataset contained 1296 patient records and 225 predictor variables.
A preliminary exploratory analysis of the data led to the removal of incomplete variables (features less than 60% filled) (n=179) and variables irrelevant to predicting outcomes (e.g. location of first imaging, clinician ordering CT (open access CT), contrast agent) (n=14), as well as the grouping of duplicated predictor variables (e.g. Symptom 1 and Symptom 1 -other) (n=10). Additionally, a number of patients were removed due to incomplete records (i.e. a patient is missing more than 60% of the reduced predictor variables) (n=51) or because of a lack of symptomatology information (i.e. a patient did not present with any symptoms or signs) (n=227). The remaining 1018 patients records contained 21 predictor variables and one dependent variable, namely patient survival in days.
The raw dataset contained significant heterogeneity with more than 30 different brain tumour types, the most common being glioblastoma (n=540), followed by metastasis (n=198), glioma (n=186) and meningioma (n=174). The minimum age of diagnosis is 16 years while the oldest is 97 years, and a median age of 61 years. There are an almost equal number of male and female patients (51% and 49%, respectively). 18% of patients had a previous history of cancer and 48% of patients presented with a co-morbidity, the most common being cardiovascular (15% of all patients). The most common location for a tumour was in the frontal lobe (34%) followed by the temporal lobe (22%). More than half of the patients (68%) had some type of surgery and 23% of patients underwent chemotherapy. This is inline with current treatment protocols where surgery is often the first line of treatment, followed by chemotherapy and concurrent radiotherapy for malignant tumours [36]. Finally, 23% of patients received no treatment, reflecting either the benign nature of the tumour, or conversely its advanced state or poor clinical condition of the patient.
Patient survival was measured in days from radiological diagnosis of brain tumour and 35% of patients were still alive at the time of dataset analysis. This is known as censored data, which is common in survival analysis, whereby the 5 value of an observation, in this case survival, is only partially known [37]. In the raw dataset, the largest survival time is 3964 days, or about 10 years, however only 11 patients have a survival time greater than 2000 days. At the time of data analysis, all patients with censored survival data had been alive for more than one year following diagnosis.

Preprocessing
Next, we review various pre-processing steps that were needed to get the narrowed-down dataset of 1018 patients into a state suitable for our analyses.

Imputation
Given the small dataset size, missing data was managed though imputation rather than deletion. Treating all missing data the same would be a strong oversimplification as missing data can come from a variety of sources [38]. An entry for a feature may be absent, but this does not imply that the entry is 6 truly missing. For example, a patient may only present with one symptom thus leaving the remaining symptom features empty. This creates the appearance of missing data but in fact the empty entries are correctly missing. The variables to be imputed were all believed to be missing completely at random.
A number of imputation techniques were tried to determine which method was appropriate for each incomplete variable. In particular, a baseline modeand mean-fill was used for categorical and continuous variables, respectively, and were compared to a k-nearest neighbours (k-NN) [39] and regression [40] imputation technique. For k-NN, the use of normalised and non-normalised features were both explored to account for differences in numerical values. The continuous variables in the dataset are constrained thus outliers were not a concern (e.g. the feature Symptom 1 Duration must fall between 0 and 52 weeks). For each variable with missing values, the imputation techniques were evaluated on the entire dataset using 10-fold cross-validation. The imputation of categorical and continuous variables was assessed using accuracy and the standard mean square error, respectively. The optimal imputation method for each variable was then implemented on the full dataset, whereby the missing variables were replaced with the model's predicted output. More information about the imputation methods are described in a forthcoming paper based on the following thesis [41].

Discretisation
Following imputation, all continuous variables (Age, Symptom 1 Duration, and Maximum Tumour Size) were discretised in order to support the association rule mining [42] employed by the BRL and FRL algorithms (see Section 3.3).
Most rule-mining approaches make the (restrictive) assumption that all features are binary or categorical. As part of the discretisation process, we compared three methods: uniform binning, quantiles and k-means. Each feature was divided into groups ranging from size 2 to 12, increasing by increments of two.
We chose the maximum to be 12 as it was a natural divider for the feature Maximum Tumour Size, which contained the largest range in values (0 -120).
The accuracy of the discretised features was compared to the continuous feature, using the BRL model with default hyperparameters. Classification of patient survival greater than one year was evaluated on the entire dataset using 5-foldcross validation.

Dealing with Feature Collinearity
Finally, in our dataset, two sets of features were found to be highly correlated: Tumour Type and Likely Grade as well as First Treatment and Extent of Resection. Tumour type refers to the kind of tumour a patient is diagnosed with, while likely grade is an indicator of how quickly a tumour is likely to grow or spread. A grade I/II tumour is benign (slow growing and unlikely to spread within the brain) and a grade III/IV tumour is malignant (fast growing and likely to spread within the brain). However, by definition, a glioblastoma is a grade IV glioma tumour. Thus to reduce collinearity in the data, Tumour Type and Likely Grade were combined into a single feature called Diagnosis. Tumour types were separated into benign (or low-grade) and malignant (or high-grade) categories (e.g. Glioma Benign and Glioma Malignant). Metastatic tumours encompass a mix of tumour types that originate elsewhere in the body. By the fact that they migrate to the brain, metastatic tumours are all aggressive and thus classified as malignant. The second set of features, First Treatment and Extent of Resection (EOR), also suffer from multicollinearity. EOR refers to the amount of cancerous cells removed during surgery (e.g. 90-99%) and is only relevant if the first treatment a patient receives is surgery, which is not always the case. Thus we integrated EOR information into First Treatment (e.g. Surgery 100%, Surgery 90-99%) to create a more informative feature -the feature name remained First Treatment.

The Final Dataset
Our final dataset contains 1018 patient records and 19 predictor variables including patient demographics (e.g. sex, age), medical history (e.g. history of cancer, comorbidity), symptom features (e.g. symptom types and duration), 8 radiological tumour analysis (e.g. diagnosis, morphology) and treatment details (e.g. first treatment, post-op performance status). Many of these prognostic factors have been well-documented in the literature including age, Karnofsky performance (KP) score, symptoms, morphology, diagnosis (i.e. tumour type, likely grade) and treatment [43,44,45,46,47]. Table 1 provides a detailed summary of the salient variables in the final dataset, including their descriptions, value and percentage of each value present in the dataset following imputation and discretisation (see Table 4 in the Appendix for a comprehensive overview of all predictor variables in the final dataset). We briefly discuss some of the salient features below and some final processing of the features.  Table 7 in Appendix) KP Score: This is a standard way of assessing a patient's ability to perform everyday tasks [48]. The scale is a 'gold standard' in clinical oncology and is commonly used to determine a cancer patient's expected tolerance to treatments (e.g. chemotherapy). The scores ranges from 0 (dead) to 100 (normal) and is scored in deciles, although the values are ordinal (see Table 10 in the Appendix for the original definition of the KP scores). This means that a value assigned to a patient is based on a ranking but the numerical value associated with this rank is not meaningful. Thus the difference between the values 70 and 90 is not equivalent to the difference between the values 40 and 60. Furthermore, the KP scale may be subject to bias [49]. A patient's KP score is determined by clinicians, and when compiling a dataset this can result in inter-observer subjectivity [50,51]. To reduce the bias associated with the KP score, values of 70 and below were aggregated due to their negative association with survival [52] (a KP score of 70 reflects someone who can 'care for self, but who is unable to carry on normal activity or to do active work'). KP scores of 80 and above remained separate allowing for a more fine-grained analysis of the values associated with survival.

Symptom 1: A symptom is observed by the patient themselves (subjective)
and is often what drives a patient to consult a physician. Symptom 1 refers to the first symptom a patient presents with. The symptom data in the raw dataset had a high cardinality of 37 different symptom types, with many of these types pertaining to a small number of patients. Thus we decided to group symptom types into six overarching categories -e.g. Headache, Fits/Faints/Falls and Behavioural/Cognitive -based on work by Ozama et al. [53] to create a more homogeneous set of symptom types. An outline of the symptom groupings are summarised in Table 5 of the Appendix.
Sign 1: A sign is observed by a physician (objective). Sign 1 refers to the first sign a patient presents with. The sign data in the raw dataset also had a high cardinality (26 different types), thus the data was additionally grouped into six larger domains -e.g. neurological and cognitive-based on the advice of the consulting clinical experts (see Table 6 in the Appendix). Although all patients in the final reduced dataset presented with at least one symptom, 43% of patients did not present with any signs.
Diagnosis (Tumour Type): Brain tumours are broadly named based on the type of normal cell that they most resemble, and their location in the brain [54]. In the raw dataset the tumour types had a high cardinality with many entries referring to the same general tumour type (e.g. meningioma suprasellar and meningioma at cerebellopontine (CP) angle). Tumour types that appeared in less than 10 patients were grouped into a "Rare Tumour" category. Additionally, the tumour type may be benign (i.e. grade I/II), or malignant (i.e. grade III/IV). In the final dataset, the brain tumour types were reorganised based on type and malignancy (e.g. Glioma Benign, Glioma Malignant), and reduced to a cardinality of 9.
Morphology: Each tumour type can have a different sub-classification, which is represented as morphology. A tumour with heterogenous morphology contains diverse cell types with distinct molecular structure that may have different levels of sensitivity to treatment [55]. In comparison, a homogenous tumor contains the same or similar genetic or epigenetic characteristics [56].
Hence tumour morphology may be indicative of treatment response.
First Treatment: The first type of cancer treatment a patient receives is based on the presumed type based on imaging, location of the tumour, and the patient's overall health (e.g. KP score ≤ 70). Surgery, for example, may be the only treatment necessary depending on the grade of the tumour and extent of resection. Information on extent of resection was included in the first treatment types (e.g. Surgery 100%, Surgery 90-99%, Biopsy, etc.). Other treatment types include radiotherapy and chemotherapy.

Modelling Techniques
As the black box ML models (RF, LR and SVM) cannot directly handle categorical variables, one-hot encoding was used for all 19 features, which resulted in 94 different feature types. For ease in model feature comparison, one-hot encoded features were also used by the Cox PH model. Due to the small dataset size, nested cross validation [57] was implemented for hyperparameter tuning and model assessment. The inner loop, which is responsible for the model selection, used 3-fold cross-validation, and the outer loop, which is responsible for estimating model performance, used 5-fold cross-validation. Nested cross validation was repeated for three different random seeds resulting in a 3 × 5 × 3 setup. For each model, the average accuracy [58], macro-F1 [59], and area under the receiver operating characteristic curve (AUROC) [60] were reported. All models performed binary classification and one year survival labels were created from the survival data. This resulted in a relatively even split of the dataset: 443 patients (44%) survived less than a year and 575 patients (56%) survived more than a year.

Cox PH Model
The Cox PH model is a popular regression model for survival analysis [3].
This semi-parametric model predicts the risk of an event occurring (e.g. death) as a function of time. The hazard function λ(t) estimates the effect of observed variables x k on a baseline hazard function λ 0 (t). The model can be expressed 13 as: and served as an alternative statistical baseline for the ML models. Due to the one-hot encoding of the categorical variables, the resulting dataset incurred problems with high collinearity. That is, some of the independent variables were highly correlated which tends to inflate the estimated regression coefficients.
Thus the first category per feature was dropped -i.e. for a variable with k categories, k-1 dummies remained. A penalizer was also added to the model which reduces the size of the coefficients during regression, thus controlling for high correlation and improving the stability of the estimates [62]. A search for the optimal penalty parameter between the set of values {10 −3 , 10 −2 , ..., 10 1 } was performed and a value of 10 −2 was selected.
The purpose of the Cox PH model is to predict survival time. Thus the model was trained using the continuous survival data and the predicted survival time was converted to binary one year survival labels that were then used to calculate the model's performance.

Rule Lists
Rule lists are a type of intrinsically interpretable model that produces a series of if-then rules, also known as decision (or production) rules, which are used to generate predictions. Each rule is composed of two different sets of items, a and b, also known as itemsets. A decision rule is an implication of the form a → b (or if...then...), where a is an antecedent that is followed by a consequent b. As an example, for the rule: is satisfied, the model outputs a certain classification. Although the concept of decision rules is well known in AI, more recently, rule-based models have been constructed directly from data with the help of ML [63].
Instead of being crafted using domain knowledge, rules can be learned using frequent itemset mining [64,65], which looks for common patterns in the data. Itemsets, consisting of these frequent patterns, are used to construct the association rules that are normally subject to constraints on minimum support and confidence [64], although other measures such as lift [66] are possible. In particular, refers to how frequently the itemsets appear in the data, where f req(a, b) is the frequency of the itemsets containing items a and b, and N is the number of observations in the dataset. If the support threshold it is too large the algorithm may fail at finding the true patterns in the dataset, whereas a small minimum support may generate an excess amount of association rules that is not fit for effective use. Confidence, for its part, is defined as: and is the frequency of itemsets that contain a which also contain b, or how often a rule is found to be true [67]. Consequently, the performance of these rule mining algorithms is dependent on user-specified thresholds. For both the BRL and FRL models, rules were mined using the default minimum support threshold of 10% and confidence threshold of 80% that is commonly used in the literature. Different thresholds on minimum support and confidence were explored but model performance did not improve thus the default parameters were retained.
Finally, the BRL and FRL algorithms contain additional hyperparameters to specify the maximum rule cardinality and expected rule list length. The maximum rule cardinality refers to the length of the rule (or itemset). This value is typically set to 2 or 3 as it may be harder to reconcile a combination of features as being clinically logical when interpreting high cardinality rules.
The prior expected list length denotes the expected number of rules in the list (excluding the null rule).

Bayesian Rule Lists
BRLs [30] are used for classification problems where the goal is to learn

Falling Rule Lists
A FRL is an ordered decision list whereby the estimated probability of success, or P (Y = 1 | X), monotonically decreases down the list [31]. Analogous to BRL, pre-mined rules are first extracted from the data, then Bayesian modelling is used to produce a decision list (see Wang and Rudin [31] for mathematical details). To approximate the FRL, Monte Carlo sampling from the posterior distribution is required to generate an initial decision list. To enforce FRL monotonicity constrains, a combination of Gibbs and Metropolis-Hastings sampling [69] is used. Unlike BRL, following the production of an initial decision list, instead of yielding many sample lists, a point estimate is found using simulated annealing [70].

ML Algorithms
Three ML classifiers were exploited to predict the 1-year survival of pa- tients. An RF classifier [32], which uses a multitude of decision trees [71] for classification, was implemented. The number of trees were selected using grid search with 3-fold cross validation. A LR classifier [33] with L2 regularisation [72] was also employed. The regularisation parameter C LR was selected from Finally, an SVM classifier [34] with a radial basis function kernel [73] was used. The regularisation parameter C SV M was selected from {2 −4 , 2 −3 , 2 −2 , ..., 2 4 }. Both LR and SVM penalty parameterrs were chosen using a similar range of values to the original BRL paper [30]. All models were implemented using the scikit-learn package [74] and represent a group of relatively uninterpretable ML models.

Model Evaluation
The mean classification performance of the six modelling approaches on the brain tumour dataset are summarised in

Model Interpretability
Although the algorithms do not provide the same level of interpretability, the weighting of features at a global model level and local prediction level can be reasonably compared. Sequential feature selection was first performed on the dataset to assess feature significance. The final models interpretability was evaluated using feature importance (Cox PH, RF), post-hoc methods LIME and SHAP (RF, LR, SVM) and qualitative assessment (BRL, FRL). These aspects are discussed next.

Feature Selection
Typically, the purpose of feature selection is to remove irrelevant features or noise from the data and improve computational efficiency. We used feature selection to assess which features were most pertinent to the data and to compare these results to the feature importance of the individual models.
Sequential feature selection from mlxtend 1 allows for a range of k -features to be specified and the feature combination that scores the best during cross validation is returned. Although SVM was the best performing model, the algorithm cannot be run in conjunction with the feature selector as a result of the kernel transformation, thus RF, the second best model, was run with the feature selector to provide a baseline for feature comparison. The RF default parameters were used and features were assessed using AUROC with 5-fold cross validation. Due to one-hot encoding, a total of 94 feature types were evaluated and the selector returned the 10 best features (see Table 3).
The selected features included diagnosis, age at diagnosis, SIMD score, KP score, morphology, post-op status and urgency of referral. Notably, many of these features have been previously mentioned in the literature as important prognostic variables [46,47,75,76,77], however SIMD, a social measure of deprivation in Scotland, is often associated with survival in a population study setting rather than a hospital-based setting. Nonetheless, an association be-tween socio-economic status and cancer survival has long been demonstrated in research [78]. Despite the UK's universal healthcare, several cancer studies have linked deprivation with poorer survival outcome [79,80,81]. In our dataset, 62% of patients with a SIMD score of 4 or 5 (least deprived) survived greater than a year compared to 53% of patients with a SIMD score of 1 or 2 (most deprived).
Additionally, post-op performance status (scale 0 -5) accounts for two of the top ten feature values returned suggesting it is valuable predictor (see Table   7 in   RF feature importance is given in Figure 6. This was obtained using permutation importance, which measures the decrease in a model's performance when a feature value is randomly shuffled [32] but does not indicate whether the feature is positively or negatively correlated with the predicted outcome. Given our dataset, which contain features with cardinalities ranging from 2 (e.g. Sex) to 9 (e.g. Diagnosis), permutation importance was preferred over the frequently-used mean decrease in impurity (MDI) [83] because the latter is often biased towards features with high cardinality [84]. As can be seen, the three most influential features for the RF model were a younger age at diagnosis, a post-op status of 0 and heterogeneous tumour morphology. All three features were also used by the rule lists and sequential feature selector. Note the three feature values were not used to train the Cox PH model (due to collinearity problems as discussed previously), however the Cox PH model found the inverse feature values (i.e. an older age at diagnosis, a post-op status of 4/5 and homogeneous tumour morphology) to be informative.
Notably, the Cox PH model is seldomly used to determine feature impor-tance, rather it is a modelling technique to help adjust for confounders while assessing the effect side of a variable of interest.

Local Surrogate Model
Compared to feature importance, LIME and SHAP can assess interpretability at the local level for individual predictions, rather than at the global modular level. Local explanations may be more accurate than global explanations [26] and are beneficial for understanding why instances are classified incorrectly.
For example, Figure 7 illustrates LIME's explanation of an observation that was classified incorrectly by LR and SVM (i.e. wrongly predicted survival > 1 year) and correctly by RF (i.e. rightly predicted survival < 1 year). The top 10 influential features for the given test instance are shown. Figure 8 shows an explanation by SHAP of the same observation classified by RF. Both surrogate models were applied to all three ML models, and the same prediction instance was compared across the three models (see Figures 11 and 12 (Figure 8), features such as lobe, midline shift, SIMD and symptom type were in the top 10 most influential features.
The discrepancy between LIME and SHAP for the same model highlights the unreliability of post-hoc interpretability methods [22].

Qualitative Analysis
In medicine, where human decision making governs the process of patient treatment, a survey over domain experts is a valuable measure of interpretability [23]. The interpretability of our rule lists was assessed based on the clinical expertise of two of the current authors (M.P. and P.B.), who were provided with multiple point-estimates from both BRL and FRL models (see Figure 3, Similar features were found influential across multiple rule lists including age at diagnosis, KP score, tumour morphology, and first cancer treatment. As expected, the diagnosis (tumour type) is also an important factor for survival.
For example, benign gliomas and benign meningiomas indicted greater survival,

26
(a) Random Forest (RF) feature importance for a given test instance determined by LIME.
The observation was correctly classified.
(b) Logistic Regression (LR) feature importance for a given test instance determined by LIME.
The observation was incorrectly classified.
(c) Support Vector Machine (SVM) feature importance for a given test instance determined by LIME. The observation was incorrectly classified.  both of which are highly treatable, with a 76% [2] and 70% [85] five-year survival rate, respectively. Comparatively, brain metastases indicated poor survival and only have a 1-year survival rate of 17% [86]. The impact of these feature combinations have been well-established in the literature [46,47,75,76] and were re-produced by the rule-lists. An agreement between model predictions and clinical knowledge is essential for establishing trust in the models decision making process, as well as trust that the model will make accurate predictions when applied to new data.

Model Comparison
The features found important by the three model types (Cox PH, rule lists, ML) for survival prediction are summarised visually by a Venn diagram in Figure   9. For ease of evaluation, the general feature types are used for comparison between models (e.g. sex) instead of the individual feature values (e.g. female or male). Additionally, the features used by the ML models are for a single test instance thus only general comparisons can be made.
All of the features returned by the sequential feature selector (see Table 3), except Urgency of Referral, were used by at least one of the three model types.
All features used by the baseline Cox PH model were also found important by the rule lists and ML models. We only investigated the top 10 most influential features used by the Cox PH model hence there is likely more overlap in feature significance between the three models. The features identified as influential by all models included age, diagnosis, morphology, first treatment and postop status. The rule lists and ML models had multiple overlapping features including comorbidity, KP Score, symptom 1, symptom 2 and midline shift.
Only the rule lists found sex and history of cancer to be significant, while only the ML models found SIMD, symptom 1 duration and lobe to be important. The importance of symptomatology data is interesting, as symptoms are often talked of in regards to time to diagnosis, but less often with regards to prognosis. When looking at the RF global top 10 important features (see Figure 6), symptom and sign features were not found relevant, but when using SHAP to look at a specific test instance from the RF model (see Figure 8), as well as LR and SVM (see Figure 11 and 12 in Appendix), symptom information was relevant.
As mentioned above, sex was only found relevant for the rule lists which was surprising. Majority of research into sex differences and brain tumour survival have focused on glioblastomas, which find that men are more likely to develop, and die of, glioblastomas than women [87,88,89]. In comparison, women are twice as likely to develop meningiomas compared to men but no significant difference in outcome have been reported [89,90]. Although sex may play an important role in individual tumour types, across all tumour types sex may be less influential. Finally, four features were not used by any model: Urgency of Referral, Sign 1, Side and Max Size. Note Urgency of Referral was found to be important by the sequential feature selector (see Table 3) but not by the algorithms. Given the importance of symptom 1 and symptom 2, the irrelevance of sign 1 (the first onset objective clinical abnormality) is perhaps the most surprising. Although in our dataset 42% of patients presented with no signs, as symptoms dominate, hence this feature may be less informative for classification.

29
Features which are not ranked as important by models should arguably be given less attention in clinical evaluation and the use of such features should be reviewed if they currently play a decision role in the assessment. It is beneficial to simplify models, and decision making, by reducing some of the noise over features, as there is often extraneous data in healthcare that can impair decision making rather than support it.

Discussion
The results summarized in Table 2 demonstrate that the BRL and FRL algorithms were outperformed slightly by popular ML models. However, the innate interpretability of rule lists may mitigate potential performance loss, especially in health-care where model transparency is essential for its integration into-and influence on decision making [22]. The original BRL paper derived a stroke prediction model and found that the BRL-point estimate performed on par with SVM and only ∼2% worse than RF (their best performing model). Comparatively, the average BRL performance for brain tumour survival prediction was ∼5% worse than SVM (our best performing model). Notably the dataset used by the original authors was more than 12× the size of ours, hence the additional training data may have helped BRL performance. The minimal decrease in BRL performance for both stroke and brain tumour survival classification highlights the potential of innately interpretable algorithms for high-stake predictions.
Our results are also similar to that of Wang and Rudin [31], who found that FRL performance was slightly worse, but comparable to RF, LR and SVM on four public datasets. FRL performance on our dataset is within one standard deviation of the ML algorithms mean performance. The minimal loss in FRL performance is not surprising as the model's strong monotonicity constraints may sacrifice performance [31].
More generally, the slight loss in rule list performance compared to the ML models may be due to our dense heterogeneous dataset and limited sample size.
Rule list algorithms optimise over pre-mined rules, rather than the entire feature space, hence the algorithm's computational effort scales with the number of antecedents rather than the number of features [30]. Rule-lists are a promising interpretable model but are currently limited to categorical features and binary classification (see [91] for a recent proposal of a multi-class rule list algorithm). Similar to decision trees, rule lists cannot deal with linear relationships and due to their categorical input requirement, rules can only produce step-like predictions [26]. Additionally, a caveat to rule list interpretability is that such models are generally not stable. There may be multiple equally good rule lists and it is not clear which will be returned by the algorithm [30]. FRLs, whereby rules that favour survival less than and greater than a year are used. In comparison, FRLs have the added benefit of automatically stratifying patients by risk thus a clinician only needs to look at the top few rules to classify the most high risk patients. Similar to Senders et al. [16], an interactive graphical representation of the rule list model could be created, whereby a clinician inputs a patient's features and a prediction is returned along with the decision rules used to make that prediction. Finally, the integration of additional clinical information such as blood tests or genetic data may improve the clinical validity of rule list models. Blood tests are now being investigated as a means for brain tumour diagnosis [92,93] and genetic alterations have shown to be effective predictors for tumour prognosis [14,94].
Although the innate interpretability of rule-lists cannot be directly compared to the post-hoc interpretability of ML algorithms, general conclusions can be made. Traditional variable importance algorithms are limited to group-level analysis but LIME and SHAP enable the explanation of individual predictions to understand the contribution of each predictor. Our results showed that similar features were used by the three ML models for making predictions. However, the weighting of each feature varied between models and across interpretability techniques. The different feature weightings between models may explain the variability in model performance, but the difference within interpretability techniques highlights the inconsistency between post-hoc methods. Because post-hoc methods assess interpretability after model construction, explanations can prove misleading and unreliable [22], and there is a growing body of literature that has questioned the credibility of LIME and SHAP [22,95,96,97,98].
There is a large toolbox of post-hoc methods [26] available to assess model interpretability, however, the absence of a cohesive definition for interpretability makes it difficult to assess the quality of different interpretability techniques.
By agreeing on clear quantitative metrics for interpretability, the development of robust trusted interpretability techniques can follow [99].

Strengths and Limitations
This was the first study to apply classification algorithms to a novel brain tumour dataset for 1-year survival prediction. Brain tumours are a rare but deadly disease, and compounded by their heterogeneity, an accurate progno-sis by clinicians is a challenging task. Also, to our knowledge, this is the first study to compare intrinsic and post-hoc interpretability methods for the assessment of predictive brain tumour survival models. As ML continues to advance, the development of tools to assist clinicians with these high-stake medical decisions by providing trustworthy data-driven support will become essential for ployed. In addition, the data used in this study was heterogeneous and a second validation dataset is required for confirmation of our results. With the addition of new data, this study could also be extended to explore the application of post-hoc interpretability methods to neural networks. As discussed above, rule-lists currently require categorical features and are limited to binary classification (see [91] for multi-class rule list algorithm proposal). Extension of the rule list algorithm for multi-class classification or regression is an important next step for improving rule-list performance and constructing a competitive interpretable rule list classifier.
Finally, although not directly related to the ML models, our dataset required imputation and discretisation. There is the potential for imputation to introduce bias into the data [38,103] and the chosen imputation method can influence the final results [104]. Additionally, although discretisation can be used to improve the clarity of classification models by extracting useful feature intervals, the split of the feature will also effect a model's performance. Both pre-processing techniques have the potential to reduce model performance which we sought to mitigate during dataset preprocessing through the exploration of multiple imputation and discretisation algorithms.

Conclusion
This study investigated the performance and interpretability of multiple al-

Conflict of interest statement
The authors declare no conflict of interest.
Appendix A

42
Grade Description 0 Fully active, able to carry on all pre-disease performance without restriction.
1 Restricted in physically strenuous activity but ambulatory and able to carry out work of a light or sedentary nature, e.g., light house work, office work.
2 Ambulatory and capable of all self-care but unable to carry out any work activities; up and about more than 50% of waking hours.

3
Capable of only limited self-care; confined to bed or chair more than 50% of waking hours.

4
Completely disabled; cannot carry on any self-care; totally confined to bed or chair.


Benchmark and application of unsupervised classi ﬁ cation approaches for univariate data

Unsupervised machine learning, and in particular data clustering, is a powerful approach for the analysis of datasets and identi ﬁ cation of characteristic features occurring throughout a dataset. It is gaining popularity across scienti ﬁ c disciplines and is particularly useful for applications without a priori knowledge of the data structure. Here, we introduce an approach for unsupervised data classi ﬁ cation of any dataset consisting of a series of univariate measurements. It is therefore ideally suited for a wide range of measurement types. We apply it to the ﬁ eld of nanoelectronics and spectroscopy to identify meaningful structures in data sets. We also provide guidelines for the estimation of the optimum number of clusters. In addition, we have performed an extensive benchmark of novel and existing machine learning approaches and observe signi ﬁ cant performance differences. Careful selection of the feature space construction method and clustering algorithms for a speci ﬁ c measurement type can therefore greatly improve classi ﬁ cation accuracies.

M achine learning (ML) and artificial intelligence are among the most significant recent technological advancements, with currently billions of dollars being invested in this emerging technology 1 . In a few years, complex problems which had been around for decades, such as image 2 and facial recognition 3,4 , speech 5,6 and text 7,8 understanding, have been addressed. ML promises to be a game-changer for major industries like health care 9 , pharmaceuticals 10 , information technology 11 , automotive 12 , and other industries relying on big data 13 . Its underlying strength is the excellence at recognizing patterns, either by relying on previous experience (supervised ML), or without any a priori knowledge of the system itself (unsupervised ML). In both cases, ML relies on large amounts of data, which, in the last two decades, have become increasingly available due to the fast rise of cheap consumer electronics and the internet of things.
The same trend is also observed for scientific research, including the field of nanoscience, where tremendous progress has been made in the data acquisition [14][15][16] and public databases have become available containing, for instance, a vast number of material structures and properties 17,18 . Inspiring examples of the use of the predictive power of supervised ML have, for instance, been realized in quantum chemistry for the prediction of the quantum mechanical wave function of electrons 19 and in nanoelectronics for the tuning of quantum dots 20 , the identification of 2D material samples 21 , and the classification of breaking traces in atomic contacts 22 . Unsupervised ML methods, on the other hand, are intended for the investigation of the underlying structure of datasets without any a priori knowledge of the system. Such approaches are ideally suited for the analysis of large experimental datasets and can help to significantly reduce the issue of conformation bias in the data analysis 23 .
Several studies involving data clustering in nanoelectronics applications have been reported to date [24][25][26][27][28][29][30][31] . In the study by Lemmer et al. 24 , the univariate measurement data (conductance versus electrode displacement) is treated as an M-dimensional vector and compared to a reference vector for the feature space construction, after which the Gustafson-Kessel (GK) algorithm 32 is employed for classification. A variation of this method was applied by El Abbassi et al. 28 to current-voltage characteristics. In a more recent study 27 , the need for this reference vector was eliminated by creating a 28 × 28 image of each measurement trace. However, the high number of dimensions resulting from this approach is problematic for many clustering algorithms, as the data becomes sparse for increasing dimensionality (curse of dimensionality 33 ), thereby restricting the available clustering algorithms. Several approaches have been proposed to reduce the number of dimensions, such as deep auto-encoder for feature extraction from the raw data itself 29 , or the use of the approximately linear sections of the breaking traces 31 . Characteristic of the previous studies, however, is the fact that the clustering is performed on a feature space constructed from the individual breaking traces, an approach that can become computationally prohibitive in case large datasets are acquired. An appealing alternative has been introduced by Wu et al. 25 , in which the clustering algorithms is run on the 2D conductance-displacement histogram.
In all the above-mentioned studies, only a single feature space construction method and clustering algorithm were investigated, without a systematic benchmark of their accuracy against a large number of datasets of known classes and with varying partitions. This makes it difficult to compare the performance of one method to another. In addition, few studies 25,31 provide guidelines for the estimation of the number of clusters (NoC), a critical step in data partitioning.
Here, we provide a workflow for the classification of univariate data sets. Our three-step approach consists of: (1) the feature space construction, (2) the clustering algorithm, and (3) the internal validation to define the optimum NoC. In the first part of the article, we benchmark a wide range of 28 feature space construction methods as well as 16 clustering algorithms using 900 datasets of simulated breaking traces with a number of classes varying between 2 and 10. In this benchmark, we identify the top five best performing clustering algorithms and top two feature spaces. We then apply our workflow to several distinctively different measurement types (break-junction conductance traces, current-voltage characteristics, and Raman spectra), yielding extracted clusters that are distinctively different. Importantly, our approach does not require any a priori knowledge of the system under study and therefore reduces the confirmation bias that may be present in the analysis of large scientific datasets. The attribution of the various clusters to the physical phenomena dictating their behavior, however, requires a detailed understanding of the microscopic picture of the system under study and is beyond the scope of this article.

Results
A schematic of the workflow for the unsupervised classification of univariate measurements is depicted in Fig. 1, starting from a dataset consisting of N univariate and discrete functions f(x i ), i ∈ [1, N]. Each measurement curve is converted into an M-dimensional feature vector, resulting in a feature space containing M × N data points. After this step, a clustering algorithm is applied. As the number of classes is not known a priori, this clustering step is repeated for a range of cluster numbers (in this illustration for 2-4 clusters). Here, we define a class as the ground truth distribution of each dataset, and a cluster the result of a clustering algorithm. Then, in order to determine the most suited NoC and assess the quality of the partitioning of the data, up to 29 internal cluster validation indices (CVIs) are employed. Each CVI provides a prediction for the NoC, after which the optimal NoC is estimated based on a histogram of the predictions obtained from all CVIs. These CVIs are also used to determine the optimal feature space method and clustering algorithm.
Benchmarking of algorithm performance on simulated mechanically controllable break-junction (MCBJ) datasets. In the following, a large variety of feature space construction methods and clustering algorithms are investigated and their performance is benchmarked against artificially created datasets with known classes. The aim of a benchmark is to rank the various algorithms according to their performance for a given set of parameters. Here, all algorithms were executed using their default parameters, both in the benchmark, as well as when applied to experimental datasets. The simulated datasets are conductance-displacement traces-also known as breaking traces -as commonly measured using the MCBJ technique and scanning tunneling microscrope (STM) for measuring the conductance of a molecule 34 . For a detailed description of the construction of the simulated (labeled) data, we refer to Supplementary Method 1.
In short, we generated 900 datasets, each consisting of 2000 breaking traces with known labels, with a varying number of classes between 2 and 10 (100 × 2 classes ... 100 × 10 classes). The traces were generated based on an experimental dataset consisting of conductance vs. distance curves recorded on OPE3 molecules 35,36 . This is in contrast to previous studies where the benchmark data was purely synthetic 24,29 . To account for possibly large variations in cluster population which may occur experimentally, the distribution of classes is logarithmically distributed with the most probable class having 10 times more traces than the least occurring one. For example, for two classes the distribution is 9.09% and 90.91%, for three classes the distribution is 6.10%, 33.35%, 60.55%, etc.
We applied a variety of feature space construction processes and clustering algorithms to each of these 900 datasets. We investigated vector-based feature space construction methods based on a reference vector as described in Lemmer et al. 24 , feature extraction from the raw data itself 29 , and conversion to images (two-dimensional histogram) 27 . In the latter case, inspired by the MNIST datasets 37 , measurements are converted into images of 28 × 28 pixels. This has the advantage that all inputs for the feature space construction method have the same size, independent on the number of data points in each measurement. Here, we would like to stress that the number of pixels can be chosen to fine-tune the resolution for the feature extraction, independently from the number of data points in the measurements. In Supplementary Note 1, we show that 28 × 28, inspired by the MNIST database, is a good compromise between accuracy and computational cost. This choice implies that the distinction between features occurring below the bin size (0.25 orders of magnitude in conductance and 0.1 nm in distance) is limited as it relies only on the counts within the bin itself. To illustrate this, for fixed acquisition rate, a slanted plateau can be separated from a horizontal plateau as both would yield different counts in a particular bin. For a distinction between more elaborate shapes a denser grid would be beneficial. However, the use of more bins comes at higher computational costs and may lead to highdimensional sparse data, which in turn is challenging to cluster, even after dimensionality reduction.
In the following, the three different approaches will be referred to as 'Lemmer', 'raw', and '28 × 28'. The high number of dimensions for the raw and 28 × 28 case is known to lead to the curse of dimensionality 33 ; the data becomes highly sparse and causes severe problems for many common clustering algorithms. To avoid this limitation, we have investigated a range of dimensionality reduction techniques, such as principal component analysis 38 (PCA), kernel-PCA 38 , multi-dimensional scaling 38 (MDS), deep autoencoders 38 (AE), Sammon mapping 39 , stochastic neighbor embedding 40 (SNE), t-distributed SNE 41 and uniform manifold approximation and projection 42 (UMAP). For the last two methods, three distance measure approaches were used (Euclidean, Chebyshev, and cosine, abbreviated as Eucl., Cheb., and cos., respectively), bringing the total number of feature space construction methods to 28. For all methods containing dimensionality reduction, we used a reduction down to 3 dimensions. A description of each method is presented in Supplementary Method 2. In Supplementary Note 2, we show that by increasing the dimensions for t-SNE (cos.) from 3 to 7 only a marginal gain in Fowlkes-Mallows (FM) index can be achieved for the five selected algorithms.
After each of the 900 datasets was run through the 28 feature space construction methods, 16 clustering algorithms were tested, covering a large spectrum of classification methods such as distance minimization methods (k-means, k-medoids), fuzzy methods (fuzzy C-mean 43 (FCM) and GK 32 ), self-organizing maps 44 (SOM), hierarchical methods 45 with various distance measures, expectation-maximization methods (Gaussian mixed model 46 (GMM)), graph-based agglomerative methods (graph degree linkage 47 (GDL) and graph average linkage 48 (GAL)), spectral methods (Shi and Malik 49 (S&M) and Jordan and Weiss 50 (J&W)) and density-based methods (Ordering Points To Identify the Clustering Structure (OPTICS 51 )). A description of each method can be found in Supplementary Method 3. We note that we restricted ourselves to algorithms in which the NoC can be explicitly defined as input parameter. This step is needed further on to calculate the data partitioning for 2-9 clusters and determine the optimum NoC using clustering validation indices. This restriction excludes algorithms such as density-based spatial clustering of applications with noise 52 (DBSCAN), hierarchical DBSCAN (HDBSCAN 53 ), and affinity propagation 54 . We also note that many different image classification algorithms are available that can be run directly on the 28 × 28 image before dimensionality reduction, such as deep adaptive image clustering 55 (DAC), associative deep clustering 56 (ADC), and invariant information clustering 57 (IIC). Most of these algorithms, however, are based on neural networks and are significantly more expensive in terms of computational cost, thus limiting their applicability. The execution speeds of the various feature space and clustering methods applied here is presented in Supplementary Note 3. The accuracy of the classification is evaluated using the FM index 58 ; it is an external cluster validation index (CVI) which varies between 0 and 1, where 1 represents the case of clusters perfectly reproducing the original classes. The FM index is , where TP is the number of true positives, FP is the number of false positives, and FN is the number of false negatives. The mean FM indices for all combinations of feature space and clustering approach based on all 900 datasets are shown in Fig. 2a, presented as heatmap. Figure 2b presents an example dataset that has been clustered using t-SNE (cos.) and GAL. We note that the NoC used for clustering is chosen to be the same number as the number of classes provided in the simulated dataset. The heatmap is sorted by increasing average FM index per column and row, respectively, with the most accurate combination in the lower right corner. In this extensive benchmark, the least accurate algorithm is raw + SNE combined with FCM with a FM index of 0.47, while the most accurate one is the 28 × 28 + t-SNE (cos.) feature space, combined with the GAL algorithm. Based on the benchmark performed on this dataset, this optimal combination feature space and clustering algorithm exhibits a FM index of 0.91 and outperforms previously used methods to classify similar datasets in literature 24,27,29 .
The heatmap also shows that both 28 × 28 + t-SNE and 28 × 28 + UMAP perform similarly well and provide a significant improvement in accuracy with respect to the other feature space methods investigated. In the following, we will therefore focus on these two feature space methods using the cosine distance measure. In terms of the clustering algorithm, the heatmap shows that the GAL algorithm yields the highest accuracy. This observation follows a previous study demonstrating that GAL outperforms many state-of-the-arts algorithms for image clustering and object matching 47 .
To ensure that the benchmark is not biased by the use of a logarithmically distributed class population, we produced the same heatmap as shown in Fig. 2a but on datasets containing equal-size classes (see Supplementary Note 4). This benchmark yields very similar results in terms of best performing feature spaces and clustering algorithms. Finally, to account for different noises that may be present during experiments, we generated three additional datasets (see Supplementary Note 4 for details). One dataset had an increased amount of noise, while the two others contained heteroscedastic noise, either scaling with conductance or with displacement. The best performing feature spaces and clustering algorithms remain largely unaffected.
From the fact that the row-to-row variation of FM indices, i.e., between feature space methods, is larger than the difference The rows and columns of the heatmap have been sorted by increasing average FM-index, with the best combination of feature spaces and algorithm in the lower right corner. b 2D conductancedisplacement histogram for an example dataset, including the 2D conductance-displacement histograms obtained by clustering using the best performing feature space method 28 × 28 + t-distributed stochastic neighbor embedding (t-SNE) using a cosine distance (cos.) and the graph average linkage (GAL) clustering method.
between columns (clustering methods), we conclude that the role of the feature space is more important than that of the algorithm. This can be rationalized, as a better feature space method will produce distinctively separated clusters, making it easier for the algorithm to find these clusters. However, as this benchmark is performed on synthetic data, the performance of the algorithms may be different than on actual data. Therefore, we select the five best performing algorithms, namely GK, the most accurate of the spectral methods (J&W), GMM, the most accurate graph-based method (GAL), and OPTICS for further studies in the remainder of this paper.
Application to an experimental MCBJ dataset. We now apply our workflow to an experimental dataset of unknown classes and illustrate the different steps in Fig. 3. The starting point is an MCBJ dataset consisting of 10,000 traces recorded on the OPE3 molecule 35 (see Fig. 3a for the 2D conductance-displacement histogram), to which we apply the two selected feature space methods 28 × 28 + t-SNE (cos.) and 28 × 28 + UMAP (cos.). Subsequently, these feature spaces are classified using the five selected clustering methods for a NoC ranging from 2 to 8. This gives a total of 5 × 2 × 7 = 70 different clustering distributions. For each of them, we calculate internal CVIs [59][60][61][62] . Each index is calculated for a varying NoC, from which the optimum NoC can be estimated by different means (minimum, maximum, elbow, etc.). Here, we choose 29 CVIs, including the well-known Silhouette index, Dunn, and Davies-Bouldin index, that only require a maximization/minimization of the index. As such, the index can be used to compare different clustering methods, feature space, and NoCs, and determine the optimum combination. A complete list of all the indices and their implementation can be found in Supplementary Method 4.
The heat map shown in Fig. 3b presents the calculated values of the Davies-Bouldin index as a matrix, with as columns the NoC and as rows all combinations of feature space and the clustering algorithm. From this matrix, the maximum/minimum value of the index is obtained to determine the optimum NoC and method as determined by this particular CVI. We note that the use of CVIs to estimate the NoC is not straightforward as each of them has implicit assumptions, in particular on the distribution of the clusters. For this reason, we only consider NoC estimations that are unambiguous, in other words, a well-defined peak or dip in the CVI. This means that we calculate the CVIs for 2-8 clusters, but we only take the CVI into account if the optimum NoC lies between 3 and 7 clusters. This procedure is repeated for all 29 CVIs and a 2D histogram is constructed (Fig. 3b). Finally, this allows us to directly access the overall best feature space (28 × 28 + UMAP), algorithm (GAL), and NoC (5). As a verification of the robustness of the CVI prediction, we have performed the same analysis including, in addition, two poorly performing feature spaces (raw + t-SNE (cos.) and raw + UMAP (cos.)) and the same five clustering algorithms. Shown in Supplementary Note 5, the analysis shows that the combination of 28 × 28 + UMAP, GAL and 5 clusters again comes out as optimal. The resulting feature space, with the individual breaking traces colored by cluster assignment, is plotted in Fig. 3c.
The resulting clusters are visualized as 2D conductance displacement histograms built from the individual breaking traces (see Fig. 3d). The plots show that the resulting 2D histograms exhibit distinctively different breaking behaviors, and based on our knowledge of these junctions, one can speculate that Cluster 1 corresponds to gold junctions breaking directly to below the noise floor, Cluster 2 to tunneling traces with some hints of molecular signatures, Cluster 3 to a fully stretched OPE3 molecule, Cluster 4 to tunneling traces without any molecular Fig. 3 Application of the workflow to measured mechanically controllable break-junction data. a Experimental 2D conductance-displacement histogram based on 10,000 breaking traces. The blue area represents the corresponding 1D conductance histogram. b Determination of the most suited feature space, clustering algorithm, and the optimal number of clusters using cluster validation indices (CVI). The feature space considered are 28 × 28 + tdistributed stochastic neighbor embedding (t-SNE) and 28 × 28 + uniform manifold approximation and projection (UMAP), both using a cosine (cos.) distance metric. The clustering algorithms considered are Gustafson-Kessel (GK), Gaussian mixed model (GMM), graph average linkage (GAL), spectral clustering following Jordan and Weiss (J&W), and Ordering Points To Identify the Clustering Structure (OPTICS). The heat map represents the Davies-Bouldin CVI, requiring a minimization of its value (red/white highlighted box). The histogram counts the occurrence of the feature space and clustering algorithm combinations, and of the optimal number of clusters, as predicted by the various CVIs. c Feature space constructed from the data of (a) using 28 × 28 + UMAP (cos.) and the GAL clustering method for five clusters. d 1D conductance and 2D conductance-displacement histogram for the cluster assignment in (c).
COMMUNICATIONS PHYSICS | https://doi.org/10.1038/s42005-021-00549-9 ARTICLE COMMUNICATIONS PHYSICS | (2021) 4:50 | https://doi.org/10.1038/s42005-021-00549-9 | www.nature.com/commsphys presence, and Cluster 5 to a two step breaking process involving molecule-electrode interactions. The exact attribution of the various clusters, however, requires a detailed understanding of the microscopic picture of the molecular junction, possibly supported by ab-initio calculations, and is beyond the scope of this article. Even though the CVIs show that five is the ideal NoC, this result should be taken with a grain of salt. To the best of our knowledge, no CVI exists that performs well in all situations. In particular clusters of largely varying densities are challenging as well as clusters of arbitrary shape. Therefore, the CVIs should be used merely as a guideline, and, as reference, we show the resulting cluster for 3-7 clusters in Supplementary Note 6.
To illustrate the versatility of our approach for different measurements types, we now proceed with the classification of two more datasets: the first one consists of 67 current-voltage (IV) characteristics, while the second one contains 4900 Raman spectra. For the current-voltage characteristics classification, we note that the OPTICS algorithm was excluded as it fails using the default parameters due to the limited amount of measurements.
Application to current-voltage characteristics. Figure 4 a presents a 2D current-voltage histogram of 67 current-voltage characteristics recorded on a dihydroanthracene molecule 36,63,64 . The IVs have been normalized to focus on the shape of the curves, not on the absolute values in current. The same clustering procedure is repeated as described previously and the best feature space and clustering algorithm is determined to be 28 × 28 + UMAP(cos.) and GAL, respectively for an optimal NoC of 5 (Fig. 4b). The corresponding feature space is presented in Fig. 4c, colored according to the clusters produced by the GAL algorithm. The 2D current-voltage histograms of the five resulting clusters are shown in Fig. 4d. Cluster 1 shows perfectly linear IVs, while cluster 2 shows a pronounced negative differential conductance (NDC) feature, with first a linear slope around zero bias, a sharp peak around 30 mV, followed by a rapid decrease of the current for increasing bias voltage. Cluster 3 contains mostly IVs with a gap around zero bias. Cluster 4 exhibits NDC as well, but with a more rounded peak compared to cluster 2, and a more gentle decrease in current. Cluster 5 shows close-to-linear IVs with some deviations from the perfect line.
Application to Raman spectra. As a final application, we investigate the classification of Raman spectra 36 . As Raman spectra are less stochastic than MCBJ measurements, we have performed a separate benchmark (see Supplementary Note 7) to rank the different algorithms. We find that, similar as for the MCBJs, the 28 × 28 + t-SNE and 28 × 28 + UMAP feature spaces perform the best. For the clustering algorithms, we find that most of them perform similarly well.
The Raman spectra are recorded on a well-studied reference system, namely a graphene membrane that has been divided into four quadrants, each exposed with a different dose of helium ions. The effect of He-induced defects on the Raman spectrum of graphene is known from literature 65,66 , but for our analysis we explicitly do not rely on any a priori knowledge of the system, i.e., we do not need to know beforehand which Raman bands will be altered by the irradiation and by what spatial pattern of the graphene has been irradiated. Instead, we use our clustering approach to identify the different types of Raman spectra present in the sample from which we infer the spatial distribution of Heirradiation doses and their effect on the graphene spectrum. The sample under study consists of a free-standing graphene membrane (6 μm diameter), suspended over a silicon nitride frame coated with Ti/Au (5 nm/40 nm). An illustration of the sample layout is presented in Fig. 5a. On this sample, a twodimensional map containing 70 × 70 spectra was acquired using a confocal Raman microscope (WITec alpha300 R) with a 532 nm excitation laser. A description of the sample preparation and Raman measurements is provided in Supplementary Note 8.
The Raman spectra were fed to the 28 × 28 + UMAP (cos.) feature space construction method and split into 7 clusters using the GAL algorithm (see Supplementary Note 8 for more details). Figure 5b presents the partitioned feature space, containing several well-separated clusters. From this partitioning, we construct a two-dimensional map of the clusters to investigate their spatial distribution (see Fig. 5c). The plot shows that the extracted clusters match well the physical topology of the sample: Clusters 1-4 are located on the suspended graphene membrane, reproducing the four quadrants. Clusters 5-7 form concentric rings located at the edge of the boundary between the SiN/Ti/Au support and the hole and on the support itself. Figure 5d shows the average spectrum obtained per cluster from the which the following characteristics can be evoked: Cluster 1 shows a flat background, with pronounced peaks at 1585 cm −1 and 2670 cm −1 . For Clusters 2 to 4 (corresponding to increasing He-dose), a peak at 1340 cm −1 appears with steadily increasing intensity while the intensity of the peak at 2670 cm −1 , on the other hand, decreases. Cluster 5, located at the edge of the support possess all three above-mentioned peaks, while for Clusters 6 and 7, a broad fluorescence background originating from the gold is present and all graphene-related peaks drastically decrease in prominence. Interestingly, the four quadrants have only been identified as distinct clusters on the suspended part, but not on the substrate. This implies that the clustering algorithm identifies spectral changes upon irradiation as characteristic features for the freely suspended material, whereas the additional fluorescence background from the gold is a more characteristic attribute of the supported material than the variation between quadrants. Nevertheless, when inspecting Clusters 6 and 7, some substructure is still visible, and performing a clustering on that subset may reveal additional structure.
The three observed peaks correspond to the well-known D-, Gand 2D-peak, and follow the behavior expected for progressive damage to graphene by He-irradiaton 65,66 . We would like to stress that our approach allowed to extract the increase of the Dpeak and the decrease of the 2D-peak when introducing defects in graphene, without any before-hand knowledge of the system: neither the type of Raman spectra under consideration, nor where on the sample the He-irradiation occurred.

Discussion
In the synthetic data, the t-SNE and UMAP algorithms score equally well in reducing each measurement from a 784 dimensional space (28 × 28) down to the 3 dimensional feature space. On the experimental datasets, however, UMAP tends to perform better. This difference emphasizes the need for labeled data which resembles as closely as possible the experimental data, as synthetic data may not capture all the experimental complexity. We note that UMAP has become the new state-of-the-art method for dimensionality reduction, surpassing t-SNE in several applications 67,68 . While t-SNE reproduces well the local structure of the data, UMAP reproduces both the local and large-scale structure 42 . Moreover, one could also investigate more advanced variants of UMAP 69 that could lead to even higher FM indices. Along the same lines, the use of more sophisticated clustering algorithms involving convolutional neural networks that can directly be applied to the 28 × 28 image merit additional research as some of them have proven to be highly accurate on the MNIST and other databases 57 , despite their high computational cost.

Conclusion
In conclusion, we have introduced an optimized three-step workflow for the classification of univariate measurement data. The first two steps (feature space construction and partition algorithm) are based on an extensive benchmark of a wide range of novel and existing methods using 900 simulated datasets with known classes synthesized from experimental break junction traces. By doing so, we have identified specific combinations of feature space construction and partition algorithm yielding high accuracies, highlighting that a careful selection of the feature space construction and partition algorithm can significantly improve the classification results. We also provide guidelines for the estimation of the optimal NoC using a wide range of CVIs. We show that our approach can readily be applied to various types of measurements such as MCBJ conductance-breaking traces, IV curves and Raman spectra, thereby splitting the dataset into statically relevant behaviors.

Data availability
The experimental datasets used in this study are freely available online at https://doi.org/ 10.6084/m9.figshare.13258640. The generated datasets used for the benchmark shown in the main text are available at https://doi.org/10.6084/m9.figshare.13258595. The b Partitioned feature space, constructed with 28 × 28 + uniform manifold approximation and projection (UMAP) using the cosine (cos.) distance metric and the graph average linkage (GAL) clustering algorithm. c Spatial map of the extracted clusters. d Average Raman spectrum of each cluster. additional datasets generated for the benchmark are available from the corresponding author upon reasonable request.

Code availability
The code used for this benchmark is freely available online at https://github.com/ MickaelPerrin74/ClusteringBenchmark. In addition, we provide a graphical user interface for clustering data in a user-friendly fashion, containing all feature space construction methods and clustering algorithms used in this study. The code of this GUI is freely available online at https://github.com/MickaelPerrin74/DataClustering. Received: 4 May 2020; Accepted: 1 February 2021;


s2fieldsofstudy:
Computer Science
Medicine

text:
Brain Tumor Detection and Segmentation using Deep Learning

Brain tumors are highly fatal and diagnosis can often be timeconsuming. Timely attention and proper consultation is required to successfully detect the tumor. However, the detection of brain tumors is a very tedious task. Brain tumors are of numerous types which pose a challenging task of detection and classification as the tumors can be ill-defined with soft tissues. Magnetic Resonance Imaging (MRI), Computerized Tomography (CT) scans, and Ultrasound images are generally used to get the brain images. Brain tumors are common, and because of the associated risk of malignancy and hyperfunction, these tumors have to be examined thoroughly. To automate the process of detection and further segmentation, a robust system is required which can be used to produce accurate results. In this work, this observation is taken into consideration and a technique was proposed that will bridge the gap between diagnosing and detecting tumors. This process will further provide a valuable second opinion to medical professionals. The methodology involves brain tumor detection using transfer learning using Residual Networks (ResNet). Further, segmentation is done to identify the area of the tumor in the MRI scan. This work demonstrates Deep Learning‟s potential in processing and extracting information from MRI images to provide a non-invasive tool for automated tumor detection and segmentation for clinical applications.

INTRODUCTION
Tumors are an uncontrolled/atypical growth of abnormal cells in the body. There are multiple types of tumors, Brain tumor is one such type. The human skull is a very rigid space and any abnormal growth in this area causes serious problems for the human body. Depending on the origin, Brain tumors are classified as primary or secondary. A primary tumor originates in the brain which is also called a malignant tumor while a secondary tumor or benign tumor occurs when a cancerous cell from another organ such as lung or kidney travels to the brain. The brain tumor is also classified based on its location -local, regional and distant. The local tumors are limited to one hemisphere of the brain, while the regional tumors cross the brain's midline and spread into the bones, blood vessels, etc. Distant tumors invade the nasal cavity, nasal pharynx, and posterior tumors.Furthermore, tumors are also classified onhowthey appear radiologically. (Rajasekaran, 2018;Gounder, 2018) [1] According to [2] Brain tumor accounts for 85 to 90 percent of total Central Nervous System tumors. It is estimated that 18600 (10,500 males and 8,100 females) adults die every year in the US due to brain tumors or related tumors. The 5-year survival rate for brain tumors after their discovery is around 31 percent, which means that 69 percent of people pass away in 5 years. As noted by (Bauer et AL 2013) [3] Gliomas are the most frequent type of Primary Brain cancer. WHO classifies them into four grades. Higher the grade, the more harmful the tumor can be. Grading helps the patient, doctor, caregivers/family members understand the severity of the tumor. The Grade I and II are classified as low grade tumors which are also known as astrocytoma. Grade III and IV are high-grade Gliomas that lead to the patient's death. Gliomas Grade IV is also called Glioblastoma Multiforme(GBM) and the median survival time for Glioblastoma Multiforme is one year as observed by (Krex et al 2007) [4], however there are exceptions where the patient survives more than 36 months. Hence, early detection of brain tumors can prove to be fruitful for a patient"s life and in improving the treatment possibilities, and a higher gain of survival possibility can be accomplished as noted by (Hossain et al. 2019) [5].
Medical Imaging Modalities which include Magnetic Resonance Imaging (MRI), Computerized Tomography (CT) scans and Ultrasound images are used to get the data for analyzing brain images. However, MRI images are the most widely used technique of getting the images as it produces better quality images of softer tissues in comparison with CT scans. According to (Seetha, 2018; Raja, 2018) [6] Neural Networks (NN) and Support Vector Machine (SVM) were the usually used methods for research purposes, but the development of Deep Learning Networks in recent years have provided a much more efficient way and have made possible more complex networks. Manual segmentation is a time-consuming task and needs to be automated. In order to help medical professionals assess this data, the first step is classifying the image according to the presence of a brain tumor. After a tumor is identified, segmentation will be done to identify exactly which part of the brain is exposed as a brain tumor. As the first step of the proposed model, classification is done using Deep Learning-Convolutional Neural Networks(CNN) using Keras and Tensorflow. Deep Learning has gained a lot of ground in the area of medical imaging owing to the speed in training and the accuracy and results which are obtained by the particular diagnosis. ResNet was used for image classification. As the second part of this model, state-of-the-art Deep Residual UNET (ResUNet) which works significantly well for semantic segmentation is utilized.  [9] Proposed an ensemble of as few as two networks; The author used a 3D CNN and a 3D U-Net network which are both trained on different data sets. In a straightforward technique, the ensemble of two networks gave better results and predictions were accurate when compared to uniform weighting. The goal is to develop an efficient neural network for the successful delineation of tumors into intratumoral classes with improved efficiency and accuracy in comparison to existing methods. It was observed that the proposed model showed improved results in comparison with state-of-the-art models.

LITERATURE SURVEY
(Hossain et al. 2019) [5] Approached this topic in a 7 step process which is skull stripping, filtering, and enhancement, segmentation, tumor detection, morphological operations, feature extraction, and classification. Two different sets of images were considered; Non-Tumor and tumor images. Skull stripping was done as the skull has less significance in brain tumor segmentation. Otsu thresholding method was employed to automatically calculate the threshold values and divide the image into foreground and background which helps in skull stripping. The fuzzy C Means algorithm is widely used in segmentation. It was observed that a 5 -Layer Convolutional Neural Network was introduced which gave better results to apprehend the tumor. In CNN after pooling, flattening is performed which is the process of converting a matrix of the input image into a single column of the vector. They have used ReLU as the activation function as it gives better convergence performance. Two different loss functions namely Adam optimizer and binary cross-entropy are used for compiling and finding the accuracy of the model. Classification of tumors is also achieved using six different classifiers and comparing their performance. SVM gave the most accurate results in this process. All the modalities like T1, T2, FLAIR are processed.

Pereria et al. (2016) [10]
Based on their approach on first eliminating the bias field distortion in the pre-processing section using N4ITK (Improved N3 Bias Correction) method however it was not enough so instead the intensity normalization method put forth by Nyul et al. (2000) [11] is more facilitating. In CNN, for initialization; Xavier Initialization was used to achieve good convergence. By this approach, the activations and gradients are maintained at controlled levels. The activation function which is generally ReLU in CNN was substituted with leaky rectifier linear units LReLU as it was found to give better results than the regular rectifier linear units. The Regularization process is followed next to avoid overfitting which is an issue where the data model performs too well on a training dataset and fails on a test dataset.Due to the small size of the training dataset and also to avoid overfitting, data augmentation was done with two different techniques to better evaluate the model and to compare other techniques of segmentation on the same dataset. This was done by generating a new patch by rotating the original patch in the multiple of 90 degrees.

METHODOLOGY 3.1 Dataset
The Brain MRI segmentation is a publicly available dataset consisting of 3929 Brain MRI scans along with the location of thebrain tumor. The MRI scans along with manual FLAIR (modality) abnormality segmentation masks are used. All images have FLAIR modality. There are two classes (class 0 and class 1) of the images i.e. whether it has a tumor or not. The MRI scans have corresponding ground truth images with the masks. The images were collected from The Cancer Imaging Archive (TCIA). The MRI images correspond to 110 patients included in The Cancer Genome Atlas (TCGA) lower-grade glioma collection with FLAIR modality i.e. fluid-attenuated inversion recovery sequence and genomic cluster data that was available [12]. The dataset was split into 70% training set, 15 % validation set, and 15% test set. The images are of the dimension 256x256x3 which is the input to the ResNet model.

IMPLEMENTATION
Convolutional neural networks in deep learning have gained a lot of importance and are extensively used in medical imaging in recent times and as a method for the non-invasive diagnosis of various diseases. It is a very complex model and requires high computational power. It is quite expensive computationally to use optimized GPUs and to use high-resolution images for the same. Also, traditionally a lot of feature extraction and image augmentation or enhancement techniques are needed to train the model efficiently. This is the reason the concept of Transfer Learning was introduced and is continuously evolving in Deep Learning. In Transfer Learning, an algorithm is pre-trained on a large dataset of images having many classes using heavy GPUs. This pre-trained model can then be used for relevant problem statements at hand by adding new fully connected convolutional layers and providing relevant data to overcome the problem of complex and time-consuming model training.
Other networks like AlexNet, ResNet, and VGG-16 architectures were considered for solving the classification problem. On comparing the three algorithms, in AlexNet, there are 7 layers and 60 million parameters. Its error rate is 15.3% which was higher than the other two algorithms. In VGG-16, the error rate is 7.3% and 16 layers. But, it has 138 million trainable parameters which makes the algorithm complex and difficult to handle. ResNet has a very low error rate comparatively of 3.57%. It has 152 layers but still has lower complexity than the VGG-16 model. Therefore, the ResNet architecture for this problem at hand was more suitable.

ResNet
ResNet is trained on the ImageNet dataset that has around 11 million images and over 1000 classes. The algorithm is used to extract features from input images. ResNet works on the concept of residual connections. Neural networks are hard to train because of the famous vanishing gradient problem that occurs during backpropagation. This can saturate the performance or even degrade the results in the worst case. "Identity shortcut connections" are introduced in ResNet which skips one or more layers which facilitate the training of the model without the vanishing gradient problem. The skip connections allow the model to learn an identity mapping function which makes sure that the next higher level will perform at least as good as the lower or previous layer as it trains the 152 layers without the vanishing gradient problem and not worse than that. The ResNet-50 model involves a design of 5 stages. Each stage is made up of an identity block and a convolution block. The convolutional block and the identity block both consist of three convolutional layers. The ResNet-50 model has over 23 million trainable parameters. Binary cross-entropy was used as a loss function and Adam optimizer.

ResUNet
RESUNET refers to Deep Residual UNET. It"s an encoderdecoder architecture with a bridge/bottleneck between them acting as the connector developed for semantic segmentation.
RESUNET is an advancement of the UNet and is a fully connected convolutional neural network that is developed to get high performance by using fewer parameters. It is an improvement of the existing UNET architecture. RESUNET takes the advantage of both the UNET architecture and Deep Residual Learning to design a better and efficient segmentation model. The use of residual blocks helps in developing a network that is deeper without worrying about the vanishing gradient problem or exploding gradients. It also helps in the efficient training of the network. The rich skip connections in the RESUNET facilitate better flow of information between different layers, which helps in better flow of gradients while training -i.e. during backpropagation. This architecture consists of an encoder or a contraction path, a decoder or expansion path, and a bridge or a bottleneck connecting both these paths, similar to a U-Net. In the case of RESUNET, these layers have pre-activated residual blocks. The term gets its name because of its U shape architecture.

Encoder
The encoder, also referred to as the contraction path, takes the input image and passes it through different encoder blocks of residual blocks and max-pooling layers, which helps the network to learn the representation in an abstract way. Each encoder block"s output acts like a skip connection for the corresponding decoder block present in the decoder. To reduce the spatial dimensions, strides are used.

Decoder
The decoder, also referred to as the expansion path takes the feature map from the bridge, also referred to as the bottleneck, or the upsampled input from the previous layer of the decoder and concatenates the various output features from the corresponding encoder block or the contraction path and learns a better semantic representation, which is used to generate a segmentation mask. The decoder consists of three/four decoder blocks, and after each block, upscaling is performed, i.e. the spatial dimensions of the feature map are doubled and the number of feature channels is reduced. The output of the last decoder is passed through a 1×1 convolution filter with sigmoid activation function. The sigmoid

Loading ResNet model:
The dataset is loaded and divided into train, validation, and test sets. Get the ResNet50 model and freeze the model weights. It has around 23 million trainable parameters. The newly added dense layers with randomly initialized weights are trained.

Classifier model for detecting whether tumor exists or not:
The output of the ResNet model is the input to the classifier model. The convolutional kernel is passed to a max-pooling layer. Average pooling is used to combine spatially nearby features in the feature maps. This is used to make the representation rigid to small insignificant changes and reduces the computational load too. Flattening is done to transform the whole matrix representing input images for processing. The output processing of the pooled feature map in a dense layer with 256 nodes. Added four more dense layers with ReLU activation function and dropout layers. It was done to avoid the effects of overfitting by dropping certain features so that the model does not simply learn the features. ReLU was used to transform the data non-linearly. It was observed that it performs much better than hyperbolic tangent function or the sigmoid activation due to its non-linearity. The final dense layer used the softmax activation function which outputs 2 classes according to the problem -i.e. whether a tumor is present or not.

Segmentation model to localize the tumor:
The Residual block for segmentation was designed using Conv2D layers, batch normalization, and ReLU activation functions. Batch normalization is used to standardize the network"s inputs. It helps to accelerate the training and provides regularization to the model which in turn improves the generalization. The contraction path or the encoder block consists of four encoder blocks where the inputs are passed on. 2x2 max pooling is followed. The feature maps after every block are doubled in size which helps in learning and generalizing the features efficiently. The bridge takes 256 nodes input and connects the contraction path and the expansion path. In the decoder block or the expansion path, up-sampling is done. Each block takes the previous input and concatenates features with the corresponding residual blocks in the encoder. 2x2 upsampling is again done here. This helps in accurately reconstructing the images. The final Conv2D layer is added with a sigmoid activation function. A 1x1 convolution layer is applied to produce an output of the same size as the input.

RESULTS AND DISCUSSION
After studying various algorithms used in convolutional neural networks, the algorithm that best suited the problem at hand was chosen. After performing a literature survey, ResNet and ResUnet architectures were chosen for the model. A dataset that contains tumorous and non-tumorous brain MRI scans was used. There was no need to perform feature extraction traditionally done in machine learning algorithms as convolutional neural networks were leveraged and the features from the network itself were used. The input images were successfully processed and the presence of a tumor was detected and further it was localized. An accuracy of 98.1% was achieved. If the confusion matrix is observed, there are 15 images that were incorrectly classified. Three images of class 0 i.e. no tumor present were identified as MRI with tumor. Twelve images that were of class 1 i.e. tumor was present were identified as MRI with no presence of a tumor.
If the nature of the dataset is observed, it can be seen that there are around 2600 brain images without any tumor(healthy) and around 1400 images where a tumor is present. From this observation, it can be concluded that due to a biased dataset, the model interpreted more images as non-tumorous than tumorous. The sensitivity and specificity are also calculated using the formula mentioned below. A specificity of 0.98 and a sensitivity of 0.99 is achieved.Precision, recall and F1-score are also calculated to evaluate the performance of the model. High precision was achieved as the false positive rate is low. F1score is the weighted average of precision and recall. Table 3 shows the classification report of precision, recall and F1score. The specificity and sensitivity are calculated as follows: Sensitivity is the ability of the model to identify positive patients correctly. Specificity is the ability of the model to identify negative patients correctly.

CONCLUSION
The diagnosis of brain tumor detection using MRI was studied. As brain tumor prevails extensively globally according to the surveys, it is vital to explore more in this field of medical imaging to find more accurate and more efficient solutions to reduce the gap between detection and treatment of the patient. Deep learning has proved to be extremely useful in the healthcare domain in recent years owing to its excellent capability to intelligently extract relevant features and process them. This solution will offer a valuable second opinion to medical professionals which can help to escalate further treatment in a timely manner. In this project, a model was successfully implemented that could identify the presence of a tumor and also identify the segmentation mask if the tumor was detected. The accuracy achieved was 98.1%. The accuracy can further be improved by using larger datasets and using hyperparameter tuning to finetune the model. Data augmentation techniques can be used to diversify the dataset further. It can be used to alleviate the problem of a biased dataset. More images could be gathered to train the model. If the confusion matrix is observed, the number of images wrongly classified as non-tumorous was significantly higher than the number of images classified as wrongly tumorous. This is something that can be worked on in the future considering the importance of correctly identifying the tumor in a non-invasive manner quickly, efficiently, and accurately.