{'fraction_non_alphanumeric': 0.02981234866828087, 'fraction_numerical': 0.016041162227602906, 'mean_word_length': 4.762589928057554, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 1, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Development of a classifier for gambling disorder based on functional connections between brain regions

Aim Recently, a machine‐learning (ML) technique has been used to create generalizable classifiers for psychiatric disorders based on information of functional connections (FCs) between brain regions at resting state. These classifiers predict diagnostic labels by a weighted linear sum (WLS) of the correlation values of a small number of selected FCs. We aimed to develop a generalizable classifier for gambling disorder (GD) from the information of FCs using the ML technique and examine relationships between WLS and clinical data. Methods As a training dataset for ML, data from 71 GD patients and 90 healthy controls (HCs) were obtained from two magnetic resonance imaging sites. We used an ML algorithm consisting of a cascade of an L1‐regularized sparse canonical correlation analysis and a sparse logistic regression to create the classifier. The generalizability of the classifier was verified using an external dataset. This external dataset consisted of six GD patients and 14 HCs, and was collected at a different site from the sites of the training dataset. Correlations between WLS and South Oaks Gambling Screen (SOGS) and duration of illness were examined. Results The classifier distinguished between the GD patients and HCs with high accuracy in leave‐one‐out cross‐validation (area under curve (AUC = 0.89)). This performance was confirmed in the external dataset (AUC = 0.81). There was no correlation between WLS, and SOGS and duration of illness in the GD patients. Conclusion We developed a generalizable classifier for GD based on information of functional connections between brain regions at resting state.

Gambling disorder (GD) is a behavioral addiction characterized by the inability to stop gambling, which leads to social problems such as debt and unemployment. 1 GD is categorized into Substance-related and Addictive Disorders in the Diagnostic and Statistical Manual of Mental Disorders 5th Edition (DSM-5), 1 and common symptoms in this category include craving, tolerance, and withdrawal state. The diagnostic criteria for GD consist of a combination of subjective symptoms and socially problematic behaviors, but do not include indicators based on biological information such as biomarkers.
In recent years, alterations of functional connections (FCs) between brain regions at resting state have been widely examined in psychiatric disorders using a technique of functional magnetic resonance imaging (fMRI), as they are less sensitive to task performance and generally have shorter acquisition times than a task-based fMRI. Alterations of FCs at resting state have been reported in GD, although the results have been inconsistent. [2][3][4] Reasons for this inconsistency may be due to the effect of nuisance variables (NVs) on MRI data, such as differences in MRI machines 5 and imaging parameters, 6 as well as variables of participants such as age 7 and gender. 8 Data-driven approaches using machine-learning (ML) techniques have been used to support the diagnosis of psychiatric disorders, 9 and successful developments of generalizable classifiers for some psychiatric disorders based on the information of FCs at resting state have been reported. [10][11][12] In those studies, classifiers were created by using an ML algorithm for the information from a large number of FCs at resting state. This algorithm optimally excluded the influence of NVs and selected a small number of FCs for classification to avoid, 13 and this classifier predicted the diagnostic label of an individual by summing the products of the correlation values of a small number of selected FCs and their weights, that is, weighted linear sum (WLS).
In this study, we aimed to develop a generalizable classifier for GD from the information of FCs at resting state, using the same algorithm as that of previous studies. 10,12 In addition, in order to explore the characteristics of WLS, we examined the relationships between WLS and clinical data.

Methods
Training dataset All participants were recruited among Japanese in the Kyoto area. The training data to be used for the ML algorithm were collected from two sites, Kyoto A and Kyoto B. Patients with GD were recruited from treatment facilities and were limited to those who were not receiving pharmacotherapy with psychotropic drugs. All patients had stopped their gambling behaviors at the time of recruitment. Healthy controls (HCs) were from the local community. Since it was difficult to recruit female patients with GD, all patients with GD as well as all HCs were males. The data of 35 patients with GD and 44 HCs were collected from Kyoto A and those of 38 patients with GD and 46 HCs were from Kyoto B. Thus, a total of 73 patients with GD and 90 HCs were recruited for the training data. GD symptoms were examined using the Structured Clinical Interview for Pathological Gambling, 14 and all patients with GD met the GD criteria according to DSM-5. Comorbid psychiatric disorders were screened by the Structured Clinical Interview for DSM-IV-TR 15 to exclude patients with any psychiatric disorders, including any substance use disorders (SUDs). The HCs were screened by the Structured Clinical Interview for DSM-IV-TR to ensure that they had no history of psychiatric disorders. For all participants, we confirmed that they were physically healthy at the time of this study and had no history of neurological injury or disease, no comorbid severe medical disease, and no illegal substance use. The data from one GD participant from Kyoto A was excluded from the training dataset because of past use of cannabis. Demographic data concerning age were collected. This study was approved by the Kyoto University Graduate School and Faculty of Medicine, Ethics Committee. All participants in this study were assured that their confidentiality would not be breached in any manner. After offering a complete explanation of the study, written informed consent was obtained from all participants.

Clinical data
A clinical scale of problem gambling was assessed using the South Oaks Gambling Screen (SOGS), 16 which consists of a 20-item selfadministered questionnaire with a scoring range from 0 to 20. SOGS comprises primarily past problematic behaviors related to gambling, including debt. A score of 5 or higher indicates that the subject is at risk for GD. SOGS has been used to screen for, and assess the severity of GD. Onset age, duration of illness, and abstinence period of patients with GD were confirmed by clinical interviews.

MRI data
We collected the data of functional images at resting state, field map images, and T1-weighted structural images. Both Kyoto A and Kyoto B belong to the Human Brain Research Center of Kyoto University, but the data from Kyoto A and Kyoto B were acquired on different MRI machines and imaging parameters (Tables 1 and 2). The functional images at resting state were acquired using a single-shot gradient-echo echo planar imaging (EPI) pulse sequence. Volumes equivalent to the first 10 s of the functional images were discarded in order to obtain magnetization equilibrium. The structural images were acquired using 3-dimensional magnetization-prepared rapid gradientecho (3D-MPRAGE) sequences. The protocols for the functional and structural images are summarized in Tables 1 and 2, respectively. The field map images were acquired with a double-echo spoiled gradientecho sequence using the following parameters: Kyoto  The imaging data were preprocessed in the same manner as in the previous study, 10 and they are briefly summarized as follows. They were preprocessed using Statistical Parametric Mapping 12 (SPM12; Wellcome Trust Center for Neuroimaging, University College London, UK) software running on MATLAB (R2017a, Mathworks, USA). Unwarping to correct for static distortions was performed by field map images using the Fieldmap toolbox. 17 The functional images were corrected for slice-timing and realigned to the mean image of the sequence to compensate for head motion. Second, the structural images were co-registered to the mean functional images and segmented into three tissue classes in the Montreal Neurological Institute (MNI) space. The functional images were normalized and resampled in a 2 Â 2 Â 2 mm 3 grid. They were smoothed by Gaussian function of full-width at half-maximum of 6 mm. After

PCN Psychiatry and
Clinical Neurosciences a classifier for gambling disorder that, we applied a 'scrubbing' procedure' 18 to discard the frame with excessive head motions from further analyses. Details of the scrubbing procedure were that frame-to-frame head motion during scanning was assessed by frame-wise displacement (FD), FD for each of the six motion parameters (translation and rotation with respect to the x, y and z axes) was evaluated, and if FD was greater than 0.5 mm, the frame was excluded from further analyses along with the previous and two subsequent frames. As in the previous study that adopted the same procedure to create a classifier for a psychiatric disorder, 11 any participant with a remaining volume of less than 30% was excluded from further analyses. The normalized images of the participants were then parcellated into 140 brain regions using the Brainvisa Sulci Atlas (BSA) 19 and the anatomical automatic labeling (AAL) composite atlas. 20 In each participant, the time courses of blood oxygenation level-dependent signals of the functional images of the cortex were extracted from the 140 brain regions and a band-pass filter (0.008-0.1 Hz) was applied. The time courses were linearly regressed out by nine parameters, namely, the temporal fluctuation of white matter, the cerebrospinal fluid and the entire brain, and six head motion parameters. In each participant, interregional Pearson correlation coefficients between the time courses of the parcellated 140 brain regions were calculated, and a matrix of 9,730 FCs (i.e. 140 Â 139/2) was created.

Machine-learning algorithm
To develop the GD classifier, we used the ML algorithm established in previous studies. [10][11][12] This algorithm uses a cascade of L1-regularized sparse canonical correlation analyses (L1-SCCA) 21 and sparse logistic regressions (SLR). 22 L1-SCCA allows both extraction of FCs that are relevant to the diagnosis of GD and removal of FCs covarying with NVs that can cause catastrophic over-fitting. 13 In this study, site (i.e. Kyoto A and Kyoto B) and age were treated as NVs. SLR has the ability to train a logistic regression model by automatically pruning out FCs that are not useful for classifying patients with GD from HCs, to select a small number of FCs that contribute This procedure is repeated for every sample in the testing pool of the outer loop. In this way, the test set of LOOCV is always independent from the dataset used to select features. (4) The union of the FCs selected across the outer loop is used to train the final SLR on all training datasets (= Kyoto A + Kyoto B), and validated using an external dataset (= Kyoto C). In summary, nested feature selection is used to remove nuisance FCs, LOOCV is used to quantify the generalizability on all training datasets, and external validation is used to quantify generalizability on the independent dataset. A schematic diagram of the GD classifier development procedure is shown in Fig. 1. The procedure for selection of FCs, training a predictive model and assessment of its generalizability, is conducted as a sequential process of 9 Â 9 nested feature-selection and leave-one-out cross-validation (LOOCV). In dividing the data into nine folds, we used a stratified approach to ensure that each fold had an equal combination of diagnosis and sites. In each iteration of feature selection (FS) in the inner loop, 8/9 of the outer loop training set is used to train L1-SCCA with different hyperparameters. In the inner-loop FS, two hyperparameters, λ 1 and λ 2 , were involved in L1-SCCA, where λ 1 controlled the sparsity of CCA weights on the diagnostic label and λ 2 controlled the sparsity of weights on FCs. The hyperparameters λ1 and λ2 of L1-SCCA vary from 0.1 to 0.9 (λ1 ≤ λ2), respectively, in steps of 0.1. In each instance of L1-SCCA, FCs that are associated with diagnosis, but not with NVs, are retained. The criterion for removing FCs was based on whether the weights of L1-SCCA were driven to 0 during the training procedure with the regularization hyperparameters λ 1 and λ 2 . In the outer loop FS, 1/9 of the samples is retained as testing pool for LOOCV, and merging of the FCs selected throughout the inner loop is obtained. After the inner loop FS is conducted, one sample is picked up from the test pool of the outer loop FS and used as test data for LOOCV. The remaining samples of the testing pool are used to train SLR on the FCs obtained in the inner loop FS. SLR was based on automatic relevance determination, a Bayesian procedure that assumed that the non-informative prior distribution for hyperparameters did not require tuning. This procedure is repeated for all samples in the testing pool of the outer loop. The above procedure makes each sample for LOOCV independent of the dataset for FS. After all LOOCVs, performance of the classifier is calculated in the whole training data in terms of area under the curve (AUC), accuracy, sensitivity and specificity. Finally, the merger of the FCs selected across the outer loop is used to train SLR on the whole training dataset, and validate its performance on an external dataset (i.e. dataset of Kyoto C). More detailed explanation of this algorithm can be found in the methods section of the previous study, 10 and the original code is available (for access, please contact the server administrator of ATR Brain Information Communication Research Laboratory: https://bicr.atr.jp/decnefpro/software/).
The statistical significance of the result of LOOCV was assessed by permutation test. 23 In the permutation test, the diagnostic labels of the participants were randomly swapped 1000 times, and the classification accuracy was calculated using cross-validation. P-values were calculated by summing all values of the permutation distribution that were equal to or greater than the result of the original labels and divided by the number of permutations. The significance level was set at P < 0.05.

External dataset
To verify the generalizability of the classifier created from the training data, an external dataset of six male patients with GD and 14 male HCs were collected from Kyoto C, which belongs to the Kokoro Research Center of Kyoto University. Kyoto C was different from Kyoto A and Kyoto B. The external dataset of Kyoto C was recruited in the same way as the training dataset. The diagnostic process and exclusion criteria for the external dataset were the same as for the training dataset. Demographic and clinical data were collected for the same items as for the training dataset, but SOGS for HCs was not conducted. In the external dataset, data of the functional images at resting state, field map images, and T1-weighted structural images were collected using a different 3T MRI machine from that for the training dataset. The protocols for the functional and structural images are summarized in Tables 1 and 2, respectively. Field map images were acquired using the following parameters: TR = 488.0 ms, TE = 4.92/7.38 ms, voxel size: 3.3 Â 3.3 Â 3.2 (0.8-mm gaps), flip angle 60 . The imaging data of the external dataset were processed by the same procedure as for the training dataset. The performance of the classifier on the external dataset was evaluated by AUC, accuracy, sensitivity, and specificity.  The statistical significance of the classification in the external dataset was assessed by permutation test 23 at a significance level of P < 0.05, the same as for the LOOCV result.

Relationships between WLS and clinical data
We focused on SOGS as a severity scale of GD and the duration of illness in clinical data. In both patients with GD and in HCs, we examined correlations between WLS and SOGS in the training dataset at a significance level of P <0.05 (two-tailed). In patients with GD, we examined correlations between WLS and duration of illness in the training dataset at a significance level of P <0.05 (two-tailed).
In the external dataset, the correlation was not examined because of the small sample size of patients with GD.

Demographic and clinical data
Although the 73 patients with GD and 90 HCs were recruited as the training dataset, one GD patient from Kyoto A was excluded because of past cannabis usage and one GD patient from Kyoto A was excluded during the scrubbing process of functional imaging data. Finally, a total of 161 data (GD patients = 71, HCs = 90) were used as training data. The demographic and clinical data of the training dataset (= Kyoto A and Kyoto B) and the external dataset (= Kyoto C) are summarized in Table 3. The GD patients from Kyoto A, Kyoto B, and Kyoto C had high gambling severity, as well as a long mean illness duration of more than 10 years.

Quality of imaging data
The results of the scrubbing process of the functional images were summarized in Table 4. In the training dataset, because of a significant difference between the GD and HC groups in the dataset of Kyoto B, the GD group had less remaining volume than the HC group, but both groups had more than 90% remaining volume of the functional images. In the external dataset, there was no significant difference between the GD and HC groups.

GD classifier
For the GD classifier, 15 FCs were selected from the training dataset, and they showed both robustness and stability across the LOOCV procedure (Fig. S1). Properties of the 15 FCs are shown in Table 5.
The selected FCs spanned a variety of functional networks and were not biased toward any particular network. The GD classifier discriminated between the GD patients and HCs with an AUC of 0.89 in LOOCV (Accuracy = 0.79, Sensitivity = 0.79, Specificity = 0.79). Distributions of WLS for the GD patients and HCs in the training dataset are shown in Fig. 2. The permutation test showed that the probability of obtaining this high performance by chance was less than P = 0.05 (P = 0.007; Fig. S2(a)). The GD classifier showed high performance, with an AUC of 0.81, on the external dataset (Accuracy = 0.75, Sensitivity = 1.00, Specificity = 0.64). Distributions of WLS for the GD patients and HCs in the external dataset are shown in Fig. 3. The permutation test showed that the probability of obtaining this high performance by chance was less than P = 0.05 (P = 0.009; Fig. S2(b)).
As a reference, we conducted conventional between-group comparisons to examine whether FCs exhibiting significant group differences (i.e. HC vs GD) in their correlation values existed. Two sample t-tests on each of 9,730 FCs revealed that only one FC connecting the left middle temporal gyrus and the left angular gyrus exhibited a significant difference in their mean values (mean AE s.d., À0.33 AE 0.19 in HC and À 0.16 AE 0.21 in GD; two-sample t-test, P = 7.7 Â 10 À7 < Pc, where Pc = 0.05/9,730 = 5.1 Â 10 À6 ). Classification based on their population mean value (r mean = À0.25) achieved accuracy of 64.6% (AUC = 0.65), which was much worse than the result of the present study (79%). We found that this particular FC was selected 7 out of 161 times throughout the LOOCV procedure, whereas the mean of the assigned weights was not significantly different from zero (Bonferroni corrected P >0.05). These results indicated that the present machine-learning based classifier better identified the neural substrates of GD, which provided higher reliability in the classification of HC and GD.

Correlations between WLS and clinical data
Before examining the correlations, Kolmogorov-Smirnov tests were used to examine the distributions' normality of WLS, SOGS and duration of illness. Although the GD and HC groups showed normal distributions in terms of WLS (GD, P = 0.20; HC, P = 0.20), normal distributions were not shown for SOGS (GD, P < 0.001; HC, P < 0.001) and duration of illness (GD, P = 0.026). Therefore, we examined the correlations using Spearman's rank correlation coefficients. There was no significant correlation between WLS and SOGS in the two groups (GD, P = 0.02, P = 0.85; HC, P = 0.19, P = 0.07). In the GD group, there was no significant correlation between WLS and duration of illness (P = 0.18, P = 0.13). In addition, we checked for a correlation between SOGS and duration of illness in the GD group and found a significant positive correlation (ρ = 0.31, P = 0.008, two-tailed).

Discussion
To the best of our knowledge, this is the first study to develop the GD classifier using information of FCs between brain regions at resting state. The developed GD classifier showed generalizability across the differences of MRI machines and imaging parameters. No relationship was found between WLS, and SOGS and duration of illness in patients with GD.
Similar to previous studies, [10][11][12] the training data in this study were collected from multiple MRI machines using different imaging parameters, and with comparable sample sizes. Among the various NVs in imaging data, it has been reported that differences in MRI machines and imaging parameters have a particularly large effect, and that it is comparable to or greater than the brain alterations caused by psychiatric disorders. 24 In the present study, as in previous studies, 10-12 L 1 -SCCA reduced these effects, contributing to the generalizability of the GD classifier derived. Addictive disorders are diagnosed based on self-reported subjective symptoms and information on problematic behaviors. In addition, it was reported that patients with addictive disorders, 25,26 including GD, 27 often deny their symptoms or hide their behaviors related to addictive targets. These issues make it difficult to arrive at an accurate diagnosis of GD. It is expected that the classifier will be used to support this effort.
Several studies have reported associations between FCs during resting state and clinical symptoms in GD, such as gambling-related cognitive distortions 28 and impulsivity and craving symptoms. 4 However, the relationship between FCs during resting state and clinical symptoms has not yet been fully clarified in GD. Examination of the relationship between the FC selected by the classifier and the clinical symptoms is expected to provide a deeper understanding of the pathophysiology of GD.
The positive correlation between SOGS and the duration of illness is reasonable, because SOGS increases with the accumulation of past problem gambling behaviors. In contrast, WLS was not correlated with SOGS or the duration of illness. Because the GD patients in this study were recruited from a treatment facility and had already stopped gambling at the time of recruitment, they had not been exposed to stimuli from continuous gambling behavior in their daily life at the time of their participation in this study. This factor might have contributed to the lack of correlation between SOGS and WLS in this study, and this result might suggest that the WLS in this study primarily reflects something like fixed "traits" of the GD patients' brains rather than their "states" that would be somewhat altered by the most recent gambling stimuli. Duration of illness and WLS were not correlated in patients with GD. This suggests that WLS does not simply reflect the chronicity of disease, which has been reported to affect brain activity in GD. 29 It is therefore recommended that a longitudinal study be conducted in the future to examine changes in progression/chronicity and responses to abstinence/treatment/intervention of WLS in patients with GD.
Gambling behavior is not an alternative (i.e. problem vs nonproblem) but a spectrum, 30 and gamblers are generally divided into stages: social/recreational gamblers who play at gambling but have no gambling problems at all, at-risk gamblers who are below the diagnostic threshold but have some gambling problems, and patients with GD. [31][32][33] In this study, we developed a classifier to distinguish patients with GD from non-gamblers and social/recreational gamblers. Applying this classifier to a population of at-risk gamblers and examining their characteristics might help us to understand the pathogenic process of GD.
Because GD is a behavioral addiction, unlike substance addictions, alterations in the brain do not involve neurotoxicity associated with addictive substances, 34,35 and therefore studies of GD could be informative for understanding SUDs. 36 Based on these suggestions, the application of GD classifier to SUDs and vice versa may provide clues to the neural substrate of psychopathology common to addictive disorders, that is, the essence of addiction.
There are several limitations to this study. First, the sample size of the data for external validation was smaller, especially for the patients' groups, than those used in the previous studies. [10][11][12] Second, the training data was from only two sites, the external validation data was prepared from only one site, and the training and external validation data were collected using MRI machines from the same manufacturer (Siemens). Third, the participants for both training and external validation data in this study were recruited among Japanese in a single area. In the future, external validation using larger sample sizes, different areas and races, and data collected by MRI machines from various manufacturers will be needed. Fourth, because it was difficult to recruit female patients with GD, the classifier was created from male patients only. Therefore, the validity of the classification for female patients with GD remains unclear. Finally, although this study excluded patients with GD who had other psychiatric disorders, it has been reported that patients with GD often have other comorbid psychiatric disorders. 37 Therefore, these points need to be taken into consideration when applying the results of this study to patients with GD.
In conclusion, we have developed a generalizable GD classifier using the information of FCs between brain regions at resting state. The classifier is expected to be used to accurately diagnose and explore the nature of addictive disorders.