dataesr/scientific-paragraphs-categorization huggingface dataset:
the upper bound, since the upper bound is sensitive to statistical fluctuations which change the peaks of the respective likelihoods. We perform a simple Fisher matrix analysis with the likelihoods directly. 3 The Fisher matrix for parameters {θ i } is the expectation value for the Hessian of the log-likelihood L, F ij = - ∂ 2 L ∂θ i ∂θ j θ. (. 1) We approximate this expectation value with the value at the peak of the likelihood. To compute the Hessian of the log-likelihoods, we use forward-mode automatic differentiation (AD) in the ForwardDiff. jl package  [41]  within the Julia language  [42]. Although it is possible to derive an analytic Hessian, the ACT likelihood has complexities (binning, nontrivial bandpower window functions, deep and wide patches) which would make this tedious. We re-implement the ACT and Planck likelihood in Julia, to enable the use of this AD package.
Acknowledgments VG and RA acknowledge the support from  NASA  through the  Astrophysics Theory Program ,  Award Number   21-ATP21-0135  and from the  National Science Foundation  under Grant No. PHY-2013951. KB acknowledges support from the  NSF  under Grant No. PHY-2112884. EC acknowledges support from the  European Research Council (ERC)  under the European Union's  Horizon 2020 research and innovation programme  (Grant agreement No. 849169 ). JD is supported by  NSF  grants  AST-1814971  and  AST-2108126. ADH acknowledges support from the  Sutton Family Chair in Science, Christianity and Cultures  and from the  Faculty of Arts and Science, University of Toronto. Research at Perimeter Institute  is supported in part by the  Government of Canada  through the  Department of Innovation, Science and Industry Canada  and by the  Province of Ontario  through the  Ministry of Colleges and Universities.
Methods: The SCD-Well trial (ClinicalTrials. gov: NCT03005652) randomised 147 older adults with SCD to an 8-week caring mindfulness-based approach for seniors (CMBAS) or an active comparator (health self-management programme [HSMP]). Well-being was assessed at baseline, post-intervention, and 6-month post-randomisation using the Psychological Well-being Scale (PWBS), the World Health Organisation's Quality of Life (QoL) Assessment psychological subscale, and composites capturing meditation-based wellbeing dimensions of awareness, connection, and insight. Mixed effects models were used to assess between-and within-group differences in change. Results: CMBAS was superior to HSMP on changes in connection at post-intervention. Within both groups, PWBS total scores, psychological QoL, and composite scores did not increase.
Poor delineation of tumor boundaries represents a risk factor for incomplete resection and postoperative neurological deficits. In this study, we evaluated the potential of wide-field imaging Mueller polarimetry (IMP) for the visualization of fiber tracts of healthy brain by measuring the optical anisotropy and scattering properties of brain tissue. Identifying the fiber tracts based on their spatial orientation reconstructed from IMP data during brain surgery would allow the delineation of "fiberless" tumors for safe and complete brain tumor resection. Methods: Methods: We implemented a wide-field IMP system operating in a visible wavelength range to visualize the white matter fiber tracts using the maps of depolarization, scalar linear retardance and azimuth of the optical axis (polarimetric markers) calculated from the recorded Mueller matrix images.
We describe the use of IO3Dus to intraoperatively characterize brain tumors and analyze its correlation with pre-operative magnetic resonance (preMR) and postoperative (poMR) studies. We detail the intraoperative advantages of this technique and the benefits of its post-operative analyses using surgical planning systems. Methods: We conducted a prospective descriptive study between April 2022 and January 2023 including patients operated on brain tumors using IO3Dus (BK-5000) We described sonographic characteristics of brain tumors: pattern, distinction from normal brain using Mair grade, initial volume (IV) and residual volume (RV). Postoperatively, we evaluated the correlation of tumor characteristics depicted in sonographic studies with both preMR and poMR using Elements software (Brainlab).
Every microcolony was fed ad libitum with its respective diet for 35 days using pollen candies (1-3 g depending on the size of the microcolony) and sugar syrup (water:sucrose 35:65 w/w). Pollen candies were freshly prepared and renewed every other day while weighing pollen left and syrup container to determine resource collection. Collection data were corrected for evaporation using controls placed in bee-free boxes. Dead workers and ejected larvae were checked every other day. Workers that died during the experiment were removed, weighed and replaced by new tagged workers originating from the same colony. Microcolonies were reared in a dark room (27 ± 1 °C; 60 ± 10% humidity) and manipulated under red light to minimise disturbance. Upon the end of the experiment, the masses of adult individuals were noted, the brood was carefully dissected, and the masses of individuals in each developmental stage were recorded.
Stress is an increasingly prevalent mental health condition across the world. In Europe, for example, stress is considered one of the most common health problems, and over USD 300 billion are spent on stress treatments annually. Therefore, monitoring, identification and prevention of stress are of the utmost importance. While most stress monitoring is carried out through self-reporting, there are now several studies on stress detection from physiological signals using Artificial Intelligence algorithms. However, the generalizability of these models is only rarely discussed. The main goal of this work is to provide a monitoring proof-of-concept tool exploring the generalization capabilities of Heart Rate Variability-based machine learning models. To this end, two Machine Learning models are used, Logistic Regression and Random Forest to analyze and classify stress in two datasets differing in terms of protocol, stressors and recording devices.
First, the models are evaluated using leave-one-subject-out cross-validation with train and test samples from the same dataset. Next, a cross-dataset validation of the models is performed, that is, leave-one-subject-out models trained on a Multi-modal Dataset for Real-time, Continuous Stress Detection from Physiological Signals dataset and validated using the University of Waterloo stress dataset. While both logistic regression and random forest models achieve good classification results in the independent dataset analysis, the random forest model demonstrates better generalization capabilities with a stable F1 score of 61%. This indicates that the random forest can be used to generalize HRV-based stress detection models, which can lead to better analyses in the mental health and medical research field through training and integrating different models.
The Ecological Momentary Assessment (EMA) methodology, which focuses on repeated measurements throughout the day to allow self-report closer to real experiences, can be used here  [5]. In addition, many wearable technologies collect physiological data related to stress states. For example, heart rate variability (HRV)-the variation in time between consecutive heart beats and one of the most widely used stress-related features-can be collected with the use of wearable devices such as the Empatica E4 wristband. Using self-reports and HRV data from wearable technologies allows researchers to access labelled data of stress states, in which the labels are the stress self-report of participants and the dataset is composed of physiological measurements. In this context, Machine Learning (ML) models can be used to predict the stress level of participants based on data collected in real-world environments.
If successful, prediction models can go one step further than simply quantifying stress states and be used to identify, in real-time, if an individual is stressed and, in turn, prevention strategies can be used to reduce stress levels (e. g. , a meditation app can be triggered). Therefore, models based on real-life data can be developed in two ways: (i) a model is trained on more accurate and less noisy laboratory data; and tested on real-life, more representative data; (ii) a model is trained solely on real-life data. The goal of this study was to develop proof-of-concept monitoring models built on data collected in daily life environments using these two approaches and focusing on HRV data. First, a model was trained based solely on data collected from a laboratory experiment, and a model based solely on data collected in daily life.
Using this nomenclature, our study will focus on DDSR and LDSR types. In their study, the authors collected self-reports and physiological measures with the Empatica E4 in a laboratory experiment, and also collect daily life data using the Empatica and an EMA methodology for the self-report, collecting four data points over a period of seven days. Using only real-life HRV data, they achieved results from 65% to 68. 30% across several models with 10-fold cross validation, with the best models being a Multi-layer Perceptron and Logistic Regression (LR). When using laboratory data combined with reallife self-report, the accuracy increased to over 70% for most models, with best results being observed with the Random Forest (RF) and Logistic Regression models (accuracy of 71. 78%) and the Support Vector Machine (SVM, 73.
44%). Giannakakis et al. [9]  investigated HRV parameters in order to recognize stress using different machine learning algorithms. They used a personalized baseline for each participant in order to eliminate inter-subject variability and use it to normalize data. Models were applied to HRV features before and after a pairwise transformation. The selected features fed machine learning systems achieving a classification accuracy of 84. 4% for the transformed features with a Support Vector Machine (SVM) model and 75% accuracy with a RF model without transformation. R. Castaldo et al. [10]  also used different models to detect stress from linear and non-linear HRV features. The dataset they used was recorded from 42 university students, during oral examination (stress) and at rest after a vacation.
The accuracy without this additional context is 76%, increasing to 92% with the SVM detector. It is true that stress detection using HRV features have been investigated thoroughly in various studies, some of which are cited above. Several AI models are used on different datasets and many of them yield fairly high accuracy scores. However, the comparability of these studies is very difficult given the many differences in terms of sensors, stressors and preprocessing approaches. Furthermore, the generalizability of these models is almost never discussed. One way to tackle this problem would be to use cross dataset analysis to study the generalizability of a model and measure of how useful the results of a study are for a broader application. Although there is intensive research in the field of stress monitoring from physiological signals, there is only a few publicly available datasets.
One of the first stress datasets was published by Healey et al. [13]. It included ECG, trapezius muscle signal, skin conductance and respiration from 24 subjects during 50 min real-world driving. Protocol validation was achieved by administering questionnaires and conducting video coding for some of the subjects. This is one of the rarer studies to have been carried out in an ambulatory environment. Another stress dataset of note is the SWELL dataset  [14] ; composed of a variety of data such as HRV, body postures, facial expressions, and skin conductance, providing interesting behavioural data in addition to physiological ones. The dataset was collected from an experiment of 25 subjects in their work spaces while they performed typical knowledge work under stressful conditions such as time pressure and email interruptions.
Various data including computer logging, facial expression, body postures, ECG and skin conductance were recorded in neutral and stressful conditions. The Database for Emotion Analysis using Physiological Signals (DEAP)  [15]  is composed of Electroencephalograms (EEG) readings and other peripheral physiological signals such as Galvanic Skin Reponse (GSR), Electromyograms (EMG), respiration among others, from 32 participants watching music videos together with self-report. Furthermore, Schmidt et al. [16]  recently used the Wearable Stress and Affect Detection Data Set (WESAD) which uses the Empatica E4 as well as a chest-band to collect respiration data, with self-reports composed of several stress questionnaires for ground truth. Using HRV features in addition to Electrodermal Activity (EDA), temperature and others, the authors achieved accuracies on a variety of ranges from around 60% to 90% depending on the data used and the model, for binary stress classification.
Paper Contribution This paper presents one of the first explorations of the generalizability of HRV-based machine learning models for stress detection. The study uses a specific approach, including a leave-one-subject-out cross-validation and a cross-dataset analysis, which are more representative of real-world applications. Furthermore, training the models on laboratory data and testing them on real-world data makes the study particularly noteworthy. Laboratory data are often more controlled and consistent than real-life data, making it easier to obtain accurate measurements and labels. Additionally, it is typically collected in a controlled environment, which can reduce the amount of noise and variability in the data. On the other hand, real-world data often contain more variability and noise, making it a more challenging test for the model.
Datasets In this study, two different datasets were used to test ML model's generalizability on data collected in different setups using different sensors. The experimental studies were conducted independently on different subjects in distinct time frames. They were approved by unrelated institutional review boards and IRB numbers were obtained for both datasets introduced below. A representative sample of the French population in terms of age and gender was chosen for the study. Only healthy volunteers who did not have any chronic diseases such as chronic stress, cardiovascular diseases or other conditions that could affect the collected signals were included  [18]. The initial phase of the study, in which participants were in a state of relaxation, was used as the benchmark. A measurement of cortisol taken immediately after this phase was used to compare to a second measurement taken after a stress phase, in order to confirm the effectiveness of the stressors used in the study.
University of Waterloo Stress Dataset (UWS) UWS dataset  [20]  contains physiological data including HRV, EDA, and ECG from 27 subjects recorded during two weeks in their personal, real-life environment. The sample includes 19 women-32% aged 18-24; 27% aged 25-34; 26% aged 35-44; 5% aged above 65%-and 8 men-25% aged 18-24 and 25-34; 50% aged 35-44. Participants were recruited from a random sample in Ontario, and due to difficulty in finding participants unhealthy individuals (i. e. , answered yes to having chronic disease, illness, smoking or drug use) were allowed (for this sample, 5 women responded yes to the aforementioned question). Since this dataset is comprised of real-life data, it is important to note no control or baseline was used. The Empatica E4 wristband is used to record data and the main objective was to identify stress in ambulatory, daily life conditions.
Labelling is based on self-reports collected approximately every three hours through the Depression, Anxiety and Stress Scale (DASS-21) using only questions related to stress. It consists of 7 items, each rated on a four-point Likert scale (0-3) based on how much the item has applied to the person over the past three hours. Data segments are labeled as stress when the DASS questionnaire following the segment indicates a score higher than 7, which on DASS-21 represent mild levels of stress and above  [21]. Subjects reported being stressed 17% of the time on average. Overall, 70% of the UWS dataset was comprised of female participants. In this paper, HRV signals recorded by the Empatica E4 are analyzed for stress identification. This dataset collection was approved by the University of Waterloo Research Ethics Board (IRB 43612, 6 October 2021).
Therefore, measuring HRV can provide insights into an individual's stress levels through several features. In this study, HRV analysis is performed using various Python Toolboxes including HRV  [26] , Time Series Feature Extraction Library (TSFEL)  [27] , Python toolbox for Heart Rate Variability (pyhrv)  [28]. Features are computed over side-by-side 5 min segments for the UWS dataset. On the other hand, for the MMSD dataset, 5 min segments with a 1 min sliding window is used to increase the number of analyzed windows. Pre-processing steps are required prior to any HRV analysis in order to handle data losses and bias caused by errors in the signal. They include : 1. Deletion of abnormal beats (RR > 1. 3 s or RR < 0. 3 s) 2.
A total of 61 features in the time, frequency, and non-linear domains are computed among the most used HRV features, and are listed in the Table  1  along with the Python toolbox used for each set of features. In this study, frequency domain analysis is performed using Fast Fourier Transform (FFT) on signals re-sampled at 8 Hz. HRV spectrum is aggregated into very low frequency (VLF) (0. 003-0. 04 Hz), low frequency (LF) (0. 04-0. 15 Hz), and high frequency (HF) (0. 15-0. 4 Hz)  [31]. Table  2  summarizes the datasets dimensions with class sizes and number of subjects. The dimensions of the UWS dataset are much greater than the MMSD dataset despite the number of subjects being lower. This is because in the first dataset, subjects were recorded every day for two weeks compared to the 40 min duration for each subject in the latter dataset.
Classification Models A logistic regression model (LR) was used in this study. This model is usually relevant when the objective is to predict a categorical dependent variable-such as in this case Stress (2) VS No Stress (1). The 'LogisticRegression' package from the SKLEARN library in Python was used. A Random Forest model (RF) was also used to classify stress versus non-stress states in both datasets due to its numerous advantages, such as robustness to outliers and non-linear data and requiring very little pre-processing. Moreover, over-fitting can be prevented thanks to simple hyper-parameters optimization and pre-pruning techniques by prematurely stopping the growth of the decision tree. The model was implemented using the 'RandomForest' package from the SKLEARN library in Python. A grid search with a 10-fold cross-validation was used for hyper-parameter optimisation.
The model was optimized over the ROC AUC score since in this case, positive and negative classes are equally important. Hyper-parameters tuned to prevent the model from over-fitting include MIN-SAMPLES SPLIT, the minimum number of samples required to split an internal node and MIN-SAMPLES-LEAF the minimum number of samples per leaf node The number of decision trees grown based on a bootstrap sample of the observations N-ESTIMATORS and the number of features to consider when looking for the best split MAX FEATURES were also tuned in the grid search. The grid search was only performed on the MMSD dataset and the same hyperparameters are used in all analyses. This choice is due to the quality of data, which is assumed to be better in laboratory conditions and the fact that labels are more accurate.
2. Cross dataset analysis: The RF and LR models are trained on MMSD dataset and tested on the UWS. The end goal is to assess the models' ability to adapt properly to new, previously unseen data. Specific pre-processing steps are required before using any ML model to avoid false conclusions caused by extremely imbalanced datasets. First, extreme outliers are removed using the 1. 5 Interquartile Range (IQR) method  [33]. IQR = Q3 -Q1. ( 1 ) where Q1 is the first quartile of the data, i. e. , 25% of the data lies between minimum and Q1. Q3 is the third quartile of the data, i. e. , 75% of the data lies between minimum and Q3. To detect the outliers using this method, a new range was defined and any data point lying outside this range is considered as an outlier and is deleted. The range is as given below: Lower bound : (Q1 -1.
Evaluation Metrics A number of metrics were used in order to have a deep understanding of our model's performance especially given the extremely imbalanced datasets. F1-score is computed as the harmonic mean of precision and recall where: Precision = TP TP + FP , Recall = TP TP + FN , =⇒ F1 = 2 * Precision * Recall Precision + Recall. ( 4 ) where TP = True Positive, HRV windows of stress classified as stress, FP = False Positive, HRV windows of relaxation classified as stress, FN = False Negative, HRV windows of stress classified as relaxation. To tackle the class imbalances, the MACRO-average f1-score is computed given the fact that classes are equally important. Metrics are also presented for each class in order to see how well each class is recognized by the RF model. Moreover, ROC AUC scores are computed since they capture more than one aspect of the classification by taking both false positives and negatives into account through the True Positive Rate (TPR) and False Positive Rate (FPR): TPR = TP TP + FN , FPR = FP FP + TN , =⇒ AUC ROC = 1 + TPR -FPR 2.
( 5 ) Finally, specificity, also known as true negative rate was computed. It is a measure of the model's ability to correctly identify negative examples (non stress). Specificity (TNR) = TN TN + FP , (6) This performance metric is relevant in the context of imbalanced datasets because the model may be trained to prioritize accuracy over identifying the negative examples of the minority class. By using specificity as a performance metric, it ensures that the model is able to identify the majority class (non stress) with a high degree of accuracy, while still maintaining a high sensitivity for the minority class (stress). Python functions were used to compute the metrics namely "f1_score" and "roc_auc_score" from Sklearn Library. Scores from the cross-dataset analysis are an indicator of the generalizability of the model trained with laboratory data on signals collected in an ambulatory environment.
Independent Analysis Results from the independent datasets are presented in Tables  4  and 5 , best scores are highlighted in bold. The LR model outperformed the RF model on the MMSD dataset. Using the LR model, both Stress and Non Stress classes are well recognized with an f1 score of 71% for each class and an accuracy of 74%. For the UWS dataset on the other hand, the RF model gave better results but the stress class is less well recognized. Although good classification scores are reached on the UWS dataset, it is important to note that one questionnaire is used to label the previous three hours, and thus, these results may be biased due to weak labelisation. Weakly labeled data can pose challenges for the models because they may not have enough information to make accurate predictions. Table  6  summarizes some of the studies that have used RF and LR models for stress detection as well as the accuracy obtained in the datasets used in this study.