dataesr/scientific-paragraphs-categorization huggingface dataset:
Introduction The Iterated Prisoner's Dilemma (IPD) is a common model in game theory, frequently used to understand the evolution of cooperative behaviour from complex dynamics  [15]. This manuscript uses the Axelrod library  [30, 49] , open source software for conducting IPD research with reproducibility as a principal goal. Written in the Python programming language, to date the library contains source code contributed by over 50 individuals from a variety of geographic locations and technical backgrounds. The library is supported by a comprehensive test suite that covers all the intended behaviors of all of the strategies in the library, as well as the features that conduct matches, tournaments, and population dynamics. The library is continuously developed and as of version 3. 0. 0, the library contains over 200 strategies, many from the scientific literature, including classic strategies like Win Stay Lose Shift  [46]  and previous tournament winners such as OmegaTFT  [51] , Adaptive Pavlov  [34] , and ZDGTFT2  [53].
The Strategy Archetypes The Axelrod library now contains many parametrised strategies trained using machine learning methods. Most are deterministic, use many rounds of memory, and perform extremely well in tournaments as will be discussed in Section 3. Training of these strategies will be discussed in Section 4. These strategies can encode a variety of other strategies, including classic strategies like Tit For Tat  [14] , handshake strategies, and grudging strategies, that always defect after an opponent defection.
Methods The trained strategies (denoted by a * in Appendix A) were trained using reinforcement learning algorithms. The ideas of reinforcement learning can be attributed to the original work of  [55]  in which the notion that computers would learn by taking random actions but according to a distribution that picked actions with high rewards more often. The two particular algorithms used here: • Particle Swarm Algorithm:  [28]. • Evolutionary algorithm:  [43]. The Particle Swarm Algorithm is implemented using the pyswarm library: https://pypi. python. org/pypi/pyswarm. This algorithm was used only to train the Gambler archetype. All other strategies were trained using evolutionary algorithms. The evolutionary algorithms used standard techniques, varying strategies by mutation and crossover, and evaluating the performance against each opponent for many repetitions.
The best performing strategies in each generation are persisted, variants created, and objective functions computed again. The default parameters for this procedure: • A population size of 40 individuals (kept constant across the generations); • A mutation rate of 10%; • 10 individuals kept from one generation to the next; • A total of 500 generations. All implementations of these algorithms are archived at  [25]. This software is (similarly to the Axelrod library) available on github https://github. com/Axelrod-Python/axelrod-dojo. There are objective functions for: • total or mean payoff, • total or mean payoff difference (unused in this work), • total Moran process wins (fixation probability). This lead to the strategies named TF1, TF2, TF3 listed in Appendix A. These can be used in noisy or standard environments (as evidenced by Sections 3.
Data at multiple wavelengths are then converted into estimates of oxy-and deoxyhemoglobin using the modified Beer-Lambert relationship. 30 The reader is referred to several reviews on fNIRS theory,  31  hardware,  32, 33  and applications  [34] [35] [36] [37]  for further details. Although fNIRS has lower spatial resolution than functional magnetic resonance imaging (fMRI) and only measures the surface of the brain, this technique is more portable, less costly, amenable to interactive paradigms, and more versatile to allow brain imaging in unique situations, including field testing, in-home, or clinical bedside studies due to its effective use in populations in which other neuroimaging methods are more challenging (e. g. , infants, children, the elderly, or psychiatric patients). Thus, optimization of the sFC technique for fNIRS is critical for expanding the scientific and clinical knowledge of a wider breadth of normative and clinical populations.
g. , the so-called "balloon model"). 51 he impulse response function for a change in underlying "neural" signal is on the order of 8 to 12 s. Thus, even with the most sophisticated of preprocessing to remove nonbrain signals, the sources of noise and slow signals within the brain are typically still much slower than the sample rate of most fNIRS instruments. As a result, the noise in fNIRS data exhibits serially correlated errors, which means that the time points of the data have nonzero autocorrelation. For fNIRS, these vascular signals are typically oversampled resulting in an overestimation of the effective model degrees-of-freedom that often results in high FDRs. The issue of serially correlated noise is a related but separate issue from the fact that much of this noise comes from global systemic physiology.
In this demonstration, two fNIRS channels were simulated with a correlation of R ¼ 0. 5 [Fig. 1(a) ]. During fNIRS data collection with larger probes comprised of patches covering multiple regions of the brain, it is not uncommon to see motion artifacts that occur at different times for the different segments of the probe [Fig. 1(b) ]. These artifacts arise from changes in the position or contact of the fNIRS probe. For example, facial muscles including the eyebrows can often create motion artifacts in fNIRS measurements over the forehead, which would not show up in measurements over the occipital cortex. Because the artifact causes a large jump in only some of the measurements, this dilutes the correlation due to the brain signals. In the simulated example to demonstrate this point, the correlation dropped from R ¼ 0.
In this sense, the methods used for generalizing an fNIRS model require additional steps or higher-order corrections than those often used in other modalities, such as fMRI, because the properties of the noise in fNIRS are different. We have detailed and compared these approaches for evoked time-series analysis of fNIRS in a recent paper. 53 In this section, we describe the similar preconditioning of fNIRS data for sFC connectivity. This section will briefly describe the mathematical concepts that we then apply in Sec. 4 of this paper.
For example, the motion artifact shown in Fig. 2  is around 4 to 5 standard deviations from the rest of the noise and therefore associated with a low probability of belonging to the same distribution as the rest of the signal. A weighting function that downweights the residual to create a more normal distribution is then computed, this weight is applied to the original data, and the model is resolved. This is repeated until convergence. In MATLAB (Mathworks, Natick, Massachusetts), for example, this is implemented using the built-in function called "robustfit. " We have detailed the use of robust regression for investigating evoked signals in fNIRS in several of our previous publications. 52, 53 n robust regression, however, one signal is considered the data and the other is the regressor.
In this second set of simulations, two random signals ½nðtÞ were generated from a multivariate normal distribution, where correlation is introduced from off-diagonals in the covariance model. Thus, half of the channel pairs had an expected nonzero correlation (positives). Like the previous simulation, the simulated "neural" signals ½nðtÞ were convolved with a canonical hemodynamic model to generate autocorrelated signals ½hðtÞ and resampled to 4 Hz. Sensitivity-specificity (ROC) curves were then calculated from the false-positive and true-positive rates of the models. We also estimated the control of the type-I error from the ROC curves by plotting the actual FDR extracted from the ROC curve against the reported p-value (expected FDR) reported by the algorithm (e. g. , the number that "MATLAB reports" without correcting for the reduced degrees-of-freedom of the serially correlated data).
Investigation of sensitivity-specificity (experimental) Finally, we examined sensitivity and specificity in experimental data to demonstrate that our simulations of motion and physiological noise in the previous simulations were experimentally appropriate. In the third set of simulations, experimental data from a separate study performed in children (ages 3 to 7 years old) were used. The collection of this data is described in Perlman et al. 61  and contained 12 fNIRS source-detector channels of oxy-and deoxyhemoglobin from bilateral measurements of the forehead on 121 different subjects. This data contained both physiological noise and motion artifacts. To examine the performance of the methods, a pair of channels was selected from either the same data file or different data files. Although the expected true correlation is unknown, we only expect nonzero correlations between data traces collected on the same subject at the same time.
In other words, any correlation between two traces from different subjects (recorded on different days) would be a false-discovery. In each simulation, two data traces were randomly selected from the same subject's data (nonzero correlation expected) or two different data files (null data). ROC analysis was performed to quantify the ability of the various models to differentiate between data that came from the same file and the data from different files (null distribution). Since, unlike the numerically simulated datasets, we were able to completely control the true-positive samples (e. g. , some of the samples from the same file might not have actual experimental correlation and thus would be reported as a falsenegative rather than a true-negative), this set of simulations allows us to look at the relative performances of the various methods but, due to the additional type-II error in the simulations, will underestimate the absolute sensitivity and specificity.
Wavelet coherence model Wavelet coherence (wCOH) was performed following the procedure described by Ref. 50 and using a modified version of the MATLAB toolbox developed by Grinsted et al. 39  Cross-wCOH is given by the expression 39 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 3 ; 3 2 6 ; 2 6 2 R 2 n ðsÞ ¼ jW AB n ðsÞj 2 jW A n ðsÞj 2 • jW B n ðsÞj 2 ; (13) E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 4 ; 3 2 6 ; 2 1 7 S½W X n ðsÞ ¼ S scale fS time ½W X n ðsÞg; ( 14 ) where S scale and S time denote smoothing operations along the wavelet scale (e. g. , frequency) and time dimensions, respectively, of the wavelet transform and are given by the convolution of the wavelet matrix and smoothing operator (see Ref. 39).
Implementation of Proposed Method Our proposed robust correlation and FD methods were implemented in MATLAB 2015b as part of a toolbox for fNIRS research. This toolbox is currently available online and has been released open source at Ref. 62 or by request to the corresponding author. A demonstration script generating the figures shown in this work is included with the toolbox. wCOH models were based on modified versions of the models used in the MATLAB toolbox developed by Grinsted et al. 39.
Experimental Data (Time-Domain Models) In this example, experimental fNIRS data were used, as described in Sec. 3. 1. 3. Two time traces were randomly selected from either the same data file (nonzero correlation expected; positive distribution) or different data files (no correlation expected; null distribution). The correlation between these two traces was computed using the standard correlation model, a 0. 1-Hz LPF and then the standard correlation model, the robust model, and the AR-robust correlation model. The true-positive (correctly identified as coming from the same experimental data file) and false-positive (unexpected correction from two data in two different files) rates were determined for the four models. Figure  5 (a) shows the ROC curve for the four correlation models. In agreement with the simulation results, the robust AR model performed the best.
6 ), namely, serially correlated error results in a decrease in the effective degrees-of-freedom of the data compared to the sample rate. This results in the reported p-value (p-hat) being artificially more significant than expected and uncontrolled type-I errors. In practical terms, this means that the value MATLAB reports (p-hat) using the standard correlation model can be substantially off from the actual false-positive rate because the serial correlations violate the assumption of independent uncorrelated noise in the data. In Fig. 6 , the true falsepositive rate is plotted against the reported value (p-hat). The robust-AR correlation model is very close to the ideal case (e. g. , the reported value is correct). However, with uncontrolled serially correlated noise, the reported p-value of the model is extremely high.
Discussion In this work, we demonstrated [Fig. 5(b)] that, when we randomly selected two experimental time courses of fNIRS data from different subjects collected at different times, we found that 70% to 80% of the samples were falsely correlated at better than p < 0. 05. This is an indication of a clear problem with uncontrolled type-I error in the standard analysis methods, which have previously been used for sFC-fNIRS. Although this is a well-known problem that Granger described in 1974 as spurious correlations in signals with temporal self-correlation,  38  this problem has been almost entirely neglected in fNIRS analysis. It is important to note that these high FDRs are not specifically the result of uncontrolled systemic physiological signals, but rather they occur because the hemodynamic signal of interest in the brain is inherently much slower than the typical sample rate of fNIRS instruments.
5-Hz sample rate, which is consistent with data presented in our Fig. 3. For fNIRS data, the typically higher sample rates of instruments make these false discoveries even more pronounced. For experimental data collected at 4 Hz, we found that FDRs as high as 70% at an expected level of p < 0. 05 indicated highly uncontrolled type-I errors in these estimates. These errors became worse if the signals were low-pass filtered as part of a preprocessing step and we found that the practice of low-pass filtering the data at 0. 1 Hz produced uncontrolled errors as high as 90% in experimental data. Importantly, this finding of high false-discovery is not specifically an artifact of the well-known global superficial contamination in fNIRS recordings. Rather, this is in addition to these global artifacts and should not be expected to be corrected by preprocessing methods.
We experimented with both affine and non-linear registrations and, due to better reproducibility, chose the results obtained from non-linear registration. Once the clusters are calculated, our method performs automatic labeling of the most stable connections based on individual cortical parcellations. We compare results between two independent groups of subjects from a HARDI database to generate reproducible connections for the creation of an atlas. To perform a better validation of the results, we used a bagging strategy that uses pairs of groups of 27 subjects from a database of 74 subjects. The result is an atlas with 44 bundles in the left hemisphere and 49 in the right hemisphere, of which 33 bundles are found in both hemispheres. Finally, we use the atlas to automatically segment 78 new subjects from a different HARDI database and to analyze stability and lateralization results.
, 2013). For the study of SWM, mainly two approaches have been used. First, previously published work has employed manual or automatic placement of regions of interest (ROI):  Zhang et al. (2010)  used a non-linear warping of a gray matter and white matter ROI atlas to extract the fibers that connect two gyri. With these results, probability maps of 29 short fibers from 20 subjects of a DTI database were created. This work was the first of its type, but no deep analysis of the bundles was performed and no bundle shape description was obtained. In he study by  Pardo et al. (2013) , the authors applied the same method to a HARDI database of 30 subjects  (Schmitt et al. , 2012) , studying the variability of the obtained bundles. The other group of works applies manual positioning of ROIs performed by an expert:  Catani et al.
Guevara et al. (2012)  applied an automatic intrasubject and intersubject clustering to 12 subjects of a HARDI database. The clusters present in at least half of the subjects were selected. Then a manual labeling was performed to create a multisubject atlas of deep white matter bundles. Several other works have been proposed to study those bundles  (Durrleman et al. , 2011; Garyfallidis et al. , 2012; Yoo et al. , 2015). All the previous algorithms were designed to analyze known deep white matter bundles. Small differences between bundles did not need to be considered, as large bundles present a main core shape, composed by several sub-bundles, with variable spread extremities. In contrast, the analysis of short association bundles requires more stringent similarity measures, to discriminate bundles connecting different small cortex regions.
Finally, for each pair of gyri, a match of the bundles across subjects was found using intersubject clustering. The method found a total of 100 bundles for the whole brain, with medium to high reproducibility across subjects. From the point of view of the construction of an SWM bundle atlas, results from the study by  Guevara et al. (2017)  are interesting, because they used a large and high-quality database and performed validation using two groups of subjects. The advantage of this method is that it can find reproducible bundles across the whole brain, including those with moderate reproducibility. However, this method relies on the cortical parcellation being applied to the fibers. All the subsequent steps, mainly based on clustering algorithms, are applied individually to each group of fibers connecting two gyri.
Errors in cortical parcellation and intersubject registration will impact the final bundles, in particular those localized in the frontiers of the gyri. To overcome this issue, we propose a method for the study of SWM based on the intersubject clustering of whole-brain short white matter fibers. This approach has also the advantage of naturally including in the study the connections within the gyri. In contrast to the study by  Guevara et al. (2012) , the method was adapted to short fibers, with the capacity to deal with a larger group of subjects and the WM structural complexity of a high-quality database  (Schmitt et al. , 2012) , in a reasonable time. To deal with a large number of fibers and reduce dimensionality, the analysis is applied to the short centroids of preclustered fibers  (Guevara et al.
Development Data Sets Development and segmentation data sets were used. All the subjects provided an informed written consent, and the data acquisition was performed with the approval of the local ethical committees. We used seventy-four healthy subjects (23. 6 ± 5. 2 years old; 43 males, 31 females; 71 right handed and 3 left handed), from a high quality HARDI database  (Schmitt et al. , 2012). Scans were acquired on a Tim Trio 3 T MRI system with a 12-channel head coil (Siemens, Erlangen), and the MRI protocol included the acquisition of a T1-weighted data set using an MPRAGE sequence (160 slices; TH = 1. 10 mm; TE/TR = 2. 98/2,300 ms; TI = 900 ms; flip angle FA = 9; matrix = 256 × 240; voxel size = 1 mm × 1 mm × 1. 1 mm; RBW = 240 Hz/pixel), a B0 field map, and a SS-EPI single-shell HARDI data set along 60 optimized diffusion weighted directions, b = 1,500 s/mm 2 (70 slices; TH = 1.
7 mm, TE = 93 ms; TR = 14,000 ms; FA = 90; matrix = 128 × 128; voxel size = 1. 7187 5 mm × 1. 71875 mm × 1. 7 mm; RBW = 1502 Hz/pixel; echo spacing ES = 0. 75 ms; partial Fourier factor PF = 6/8; GRAPPA = 2; total scan time = 16 min and 46 s). The data were preprocessed using BrainVISA/Connectomist-2. 0 software  (Duclap et al. , 2012). They were preliminary corrected for artifacts (eddy currents, susceptibility effects, spikes, and noise), and outliers were also removed. Then, the analytical Q-ball model  (Descoteaux et al. , 2007)  was computed. Wholebrain regularized streamline deterministic tractography  (Perrin et al. , 2005)  was performed on the diffusion-weighted (DW) native space, using a T1-based propagation brain mask  (Guevara et al. , 2011a) , with a forward step of 0. 2 mm and a maximum curvature angle of 30.
Segmentation Data Sets Seventy-eight subjects from a high-quality HARDI database were used for the segmentation of the SWM bundles obtained with the  method. Scans were acquired on a Tim Trio 3TMRI system with a 12-channel head coil (Siemens, Erlangen), and the MRI protocol included the acquisition of a T1-weighted data set using the same protocol employed for the main database, a B0 field map, and a SS-EPI single-shell HARDI data set along 60 optimized diffusion weighted directions, b = 1,400 s/mm 2 (70 slices; TH = 2. 0 mm, TE/ TR = 92/9,300 ms: FA = 90; matrix = 128 × 128; RBW = 1,502 Hz/ pixel; echo spacing ES = 0. 75 ms; partial Fourier factor PF = 6/8; GRAPPA = 2; voxel size = 2. 0 mm × 2. 0 mm × 2. 0 mm). The data were preprocessed using BrainVISA/Connectomist-2. 0 software  (Duclap et al.
clustering-Based sWM Fiber Bundle identification Our goal was to develop a method for the identification of the most reproducible SWM bundles of the whole brain, based on intersubject clustering, and adapted to high-quality databases. The method, depicted in Figure  2 , begins with a selection of short centroids, to reduce the number of elements and focus the analysis on short association fibers. Next, the selected centroids from a group of subjects in Talairach space are clustered using a fiber distance metric. Only reproducible clusters are carried onto the next step. An anatomical labeling using cortical parcellations is applied. Finally, only stable connections, with a significant main connection for most of the subjects, are selected. The rest of this section describes each of these steps in detail.
Short SWM Fiber Selection Short centroids, with a length between 35 and 85 mm, were selected from the tractography data sets of the development database. Most of these centroids belong to superficial short fibers. Length selection was derived from the observation of bundles with different lengths, using the preclustered data. Fibers shorter than 35 mm were discarded, because their shape is very variable and difficult to analyze. In most cases, these fibers are artifacts and do not represent structured bundles. Even in the cases were the fibers are regrouped into bundles, these belong to a short association bundle that is better represented by longer fibers. We selected an upper threshold of 85 mm for fiber length, because short U-shaped fibers do not exceed this size. Using a multi-subject deep white matter (DWM) bundle atlas  (Guevara et al.
This processing allows us to significantly reduce the clustering processing time, as only about 5% of the edges are included in the affinity graph. a ij d ij = -/ e σ 2 (O' We then run an average-link hierarchical agglomerative clustering algorithm on the affinity graph. This algorithm computes a hierarchical tree (or dendrogram) with all the cluster fusions. The original implementation of the algorithm is included in the nipy Python library. 1  It can deal with big data sets, taking advantage of the sparcity of the affinity graph. We then compute an adaptive partition of the hierarchical tree, according to a maximum distance dclmax between the centroids of a cluster. The analysis starts from the top node and traverses the entire tree, selecting nodes to be analyzed and storing their indices in a queue.