dataesr/scientific-paragraphs-categorization huggingface dataset:
Thus, the impact of using hydrological models with students while they are learning can be significant. Sanchez et al. (2016)  showed that the use of a simple spreadsheet with real hydrological data had a significant and positive impact on the civil engineering curriculum. AghaKouchak and Habib (2010) also found significant learning gains for students using modeling tools in class. Nevertheless, the added value of using models in class is not automatic and straightforward. For example,  Marshall et al. (2015)  demonstrated that the same hydrological course offered using either (i) Microsoft Excel  (Microsoft Corporation, 2019) , (ii) MATLAB (  2018 ) or (iii) the COMSOL Multiphysics software  (Zimmerman, 2006)   1  made no significant difference in student performances. This result highlights the need to use tools tailored for teaching hydrology with models.
" This moves toward reproducible hydrology In addition, R facilitates interdisciplinary work in the other fields of geosciences in which R is also used (e. g. ,  Bezak et al. (2019)  who use the airGR package  (Coron et al. , 2017 (Coron et al. , , 2022) )  for hydrological modeling and the prediction of landslides). One of the strengths of R is its ability to incorporate geographic data and spatial analysis, such as in the use of the MODIS dataset, for example, for modeling of snow accumulation and melt  (Riboust et al. , 2019). 1. 5. but not yet for teaching, even if attempts are being made A basic search with the keywords "educ*" and "teach*" (last check on 1 August 2022) in the R Hydrology Task View  (Zipper et al. , 2020)  only returns a couple of packages that address teaching aspects of hydrology: TUWmodel  (Viglione and Parajka, 2020) , which contains a hydrological model that is proposed for educational purposes, but does not contain actual exercises or an interface; and EcoHydRology  (Fuka et al.
The rationale behind airGRteaching: a glance backward The GR models were initially developed in the 1980's by Claude Michel and his colleagues at Cemagref (that recently became Irstea and then INRAE). The main objective was to design efficient models, starting from a simple structure and gradually adding complexity that proved useful for improving the model's predictive power  (Michel, 1983). This approach prioritized predictive power over explanatory models  (Shmueli, 2010) , finding justification for this from results obtained using large data sets and not from predefined concepts. This led to the development of a family of models that are usually used in lumped mode (i. e. , running at the basin scale with aggregated input). To disseminate their models beyond the Fortran programming community, the developers of the GR models a long time ago proposed Microsoft Excel spreadsheets containing hydrological models, namely, the GR1A, GR2M and GR4J models, as well as the CemaNeige snow accumulation and melt model (see next section for a description of these models), accompanied by a dummy dataset 5.
The rationale behind this approach was dual: easily providing the GR models to external users (researchers and consultants from France and abroad) and illustrating the hydrological concepts to students with the models developed in-house. The relatively high efficiency and low computationnal time requirements of these models made them easily runnable with Microsoft Excel. In addition, the use of Excel macros enabled interactivity (e. g. the possibility to automatically update simulations when parameter values are modified by users) and graphs were predefined. Later, the airGR R package was developed to propose additional GR models, and the airGRteaching R package was built as an add-on package of airGR. These tools are described in the next sections.
Basic functions for undertaking a hydrological modeling study The main steps required to undertake a hydrological modeling study can be performed with airGRteaching with the help of a few simple functions: a data preparation function, PrepGR(): with only three main arguments, namely, the hydrometeorological input data as a data frame or independent vector time series, the name of the rainfall-runoff model to run, and a boolean indicating the airGRteaching functions. If CemaNeige is activated, additional arguments are needed (e. g. , catchment elevation distribution); a calibration function, CalGR(): with three main arguments, namely, the object produced by PrepGR(), the objective function name (i. e. , which criterion is used to optimize the parameter values), and the calibration period start and end, this function calibrates the chosen GR model.
If desired, a transformation of discharge can be chosen for the objective function calculation in order to give more weight to certain ranges of discharges  (Santos et al. , 2018)  and a warm-up period can also be defined; a simulation function, SimGR(): with four main arguments, namely, the object produced by PrepGR(), the parameter values (output of CalGR() or defined by the user), the name of an efficiency criterion used to evaluate the simulation, and the simulation period start and end, this function runs the chosen GR model and assesses its performance. If desired, a transformation can be used for the criterion calculation and a warm-up period can be defined; static (plot()) and dynamic (dyplot(), which uses the functionalities of the dygraphs package  (Vanderkam et al. , 2018) ) graphical functions: these functions take as main arguments any of the objects produced by PrepGR(), CalGR() and SimGR() (to be chosen).
The graphical user interface Using the functionalities of the shiny package  (Chang et al. , 2022) , the airGRteaching graphical user interface (GUI) called with the ShinyGR() function allows one to use the GR models with no programming skills at all thanks to an intuitive interface. The ShinyGR() function takes as arguments hydrometeorological data and the simulation period start and end. Additional arguments can be provided if snow is present. Data can be provided for several catchments and the function offers the possibility to use different themes for the interface. The GR and CemaNeige models and the objective function are to be selected within the interface. Figure  1  presents a commented example of the interface. Several intuitive elements can be found. On the left side: -"Choose a dataset" to select a dataset from those provided by the user to the function; -"Choose a model" to select a model among the GR2M monthly model and the GR4J, GR5J, and GR6J daily models according to the time step of the datasets provided (models at other time steps are not included in the GUI) and to activate the CemaNeige snow accumulation and melt model for the daily models; -"Parameters values" using sliders to modify the parameters of the models.
On the right: -A table of criteria provides the values of seven performance criteria (NSE and KGE with use of squared root, inverse or no transformation of discharge, in addition to the bias); -"Show previous simulation Qold": the previously obtained simulated time series appear on the plots provided in the center of the GUI as a dotted gray line. In addition, ticking this option makes criteria of this previous simulation appear in the criteria table introduced above. This option has no effect in the "Model performance" panel. -Two buttons allow users to download the displayed plot in a PNG file format, which can be useful for a report for example (in order to ensure the tracking of the downloaded files, various information is automatically added to the file header: name of the dataset, name of the model, simulation period, parameter values, see Appendix C), and the hydrometeorological data (including the simulation) in a CSV file format, to be used externally for further analysis or to be saved.
Data associated with airGRteaching The airGRteaching package benefits from the airGRdatasets package  (Delaigue et al. , 2022b) , which contains a dataset of 19 different catchments located in France (Fig. 3  and Table  2 ). This dataset is a subset of the larger CAMELS-FR dataset  (Delaigue et al. , 2022a) , and has been assembled to include various French hydro-climatic regimes, with 12 raindominated catchments, one rain-and snow-dominated catchment, two snow-dominated catchments, two Mediterranean catch- ments and two groundwater-dominated catchments. Figure  4  shows the main characteristics of the catchment set. Catchment area ranges from 184 to 3917 km², with half of the catchment set draining less than 686 km². The dataset is composed of both static geomatic and physiographics catchment indices and hydro-climatic time series (solid and liquid precipitation, potential evapotranspiration, air temperature, and streamflow time series).
The climatic time series have been extracted from the SAFRAN reanalysis  (Vidal et al. , 2010)  and aggregated at the catchment scale, while streamflow series have been extracted using the HydroPortail (https://hydro. eaufrance. fr/). These hydro-climatic temporal series are available at the daily time step. This section and the accompanying appendices present tests based on the airGRteaching package and designed to illustrate rainfall-runoff modeling, model calibration, evaluation, and robustness in hydrological classes. These tests are also available as a vignette in the airGRteaching package: users can thus recreate all these illustrations using their own datasets. 3. 1 Understanding rainfall-runoff modeling.
e. , the total annual precipitation divided by the total annual potential evapotranspiration, cf. command lines in Appendix D11). The basic manipulations of the airGRteaching package illustrated in the previous sections can also be used in more comprehensive hydrological teaching projects, presented in a vignette format in the package (example in Fig. 11 ) available both in English and French. These three projects deal with flow reconstruction (i. e. , producing simulated streamflow over periods for which records are missing), flow forecasting (i. e. , anticipating streamflow conditions for days ahead from given  We believe that the proposed exercises and projects are must-do if one wishes to learn hydrological modeling. They represent the core of many catchment-related studies.
Perspectives Exercises linking hydrology with other disciplines and scientific communities could be developed by coupling of the airGRteaching package with other numerical tools and models. First, using actual Global or Regional Climate model outputs as rainfall-runoff model inputs would illustrate the impact of climate variability or emission scenarios on catchment hydrology, linking climatology and hydrology. In a similar way, streamflows produced by the airGRteaching package could be used as inputs to hydraulic models to produce flood maps in teaching projects involving both hydrological and hydraulic skills. Finally, coupling airGRteaching with models of water uses (e. g. water withdrawal models for drinking water or irrigation) would have interesting teaching applications. Another valuable perspective is to perform data assimilation for hydrological forecasting by recovering real-time meteorological (e.
g. , precipitation measured in raingauges), hydrological (e. g. , streamflow observed from gauging stations), or even satellite data (e. g. , MODIS snow cover observations) and using these data as inputs of a rainfallrunoff model in the airGRteaching package, e. g. with the airGRdatassim package  (Piazzi et al. , 2021; Piazzi and Delaigue, 2021). Such applications would illustrate the added value of assimilating hydro-meteorological data for better modeling in hydrology. Other exercises could be centered around uncertainties, through coupling the airGRteaching package with 10 sensitivity analysis methods. Finally, the airGRteaching package could be used for the development of serious games devoted to hydro-meteorological applications, aiming, for example, to discuss the issues of making better decisions when considering probabilistic forecasts  (Ramos et al.
, 2013). Teaching hydrological modeling requires hands-on experience with rainfall-runoff models. Dedicated tools need to be adapted to the skills of the students and users, and preferably developed in an open-source programming language to ensure the reproducibility of the results. In this context, the airGRteaching R package has been developed as an add-on to the airGR package, which gathers several lumped rainfall-runoff models widely used by hydrological researchers and practitioners. airGRteaching contains a graphical user interface and allows teachers and students to import their own data and create their own exercises. A specific dataset of 19 different catchments in France is included in the add-on airGRdatasets package. This dataset is composed of hydro-climatic time series (solid and liquid precipitation, potential evapotranspiration, air temperature, and streamflow time series).
doi. org/10. 5194/hess-2022-421 Preprint. Discussion started: 2 January 2023 c Author(s) 2023. CC BY 4. 0 License. initial conditions), and climate change applications (i. e. , transforming climate projections into hydrological projections). These three projects can be run as stand-alone with the dataset available in the airGRdatasets package, or run on other catchments by importing the necessary hydro-climatic series.
ARDL-MIDAS long-memory time-series regressions In this section, we present the modelling framework that incorporates four working components: Koyck-transformed infinite-lag Autoregressive Distributed Lag time-series regressions; Mixed Data Sampling (MIDAS) multi-time resolution time-series regressions; natural language text component obtained both via cryptotailored text processing and Transformer deep neural network architectures; and Gegenbauer long memory structure to parametrically capture persistence. The logic of combining these models is to exploit the ability of deep learning architectures to learn higher-order feature structures that can act as inputs to interpretable regression time-series models. We will begin with an overview of the overall regression structure before exploring each component.
(1) Φ p (L) = 1 - p ∑ j=1 j L j , x (m) t = x t-1+1∕m , x t-1+2∕m , … , x t , k (L 1∕m ) = k ∑ j=1 j L j∕m , j = j,0 , … , j,m T , L j∕m x (m) t = L j∕m x t-1+1∕m , L j∕m x t-1+2∕m , … , L j∕m x t T. (2) Φ p (L)Y t = J ∑ j=1 (j) k (L 1∕m j )X (m j ) t + t , 2. Considering an infinite-lag structure at time scale m j with β∞ (L, L 1∕m ) using a fractional integration of the Gegenbauer form, to capture the potential for long memory structure in the regression relationship, where we add the fractional difference operator 1 -2uL 1∕m j + L 2∕m j -d. 3. Adding a generative embedding model for the construction of high-order covariate feature interactions that can be combined within the multiple ARDL-MIDAS-Gegenbauer time-series regression and includes: • Transformer regression structures based on deep neural network multi-head attention architectures; • Natural Language crypto-specific covariate feature generation, which may range from time-series on semantics and word distributions to Context-Free Grammar parsing higher-order features.
Natural language processing for sentiment time-series structures In this section, we discuss the specifics of the application studied in this paper, where the response time-series, denoted by {Y t }, for our ARDL-MIDAS-Trans- former model is a novel construction of an entropy-based sentiment time-series from a corpus of news articles specific to particular financial assets, in this case from the cryptocurrency market. We will also discuss how to construct the instrumental variable time-series { Ỹt } to replace {Y t } in the infinite-lag ARDL-MIDAS-Trans- former model as discussed in Sect. 3. 3. This will be obtained from what is known in machine learning as generative embedding feature learning and we will use specific mechanisms for this in the NLP sentiment context: Transformer models as presented in the previous section [BERT  (Devlin et al.
, 2019) ] and semantic-and grammarbased rules for sentiment extraction such as VADER [Valence Aware Dictionary for sEntiment Reasoning  (Hutto et al. , 2014) ]. (27) Φ p (L)Y t = + ̃ ∞ (L, L 1∕m )X (m) t + (m) t (28) Y t = � 0 + � Y t-1 + �� Y t-1-p + p ∑ i=2 i Y t-i + 0 K ∑ k=0 B(k; )X (m) t-k∕m + (m) � t. (29) Y t = � 0 + � Ỹt-1 + �� Ỹt-1-p + p ∑ i=2 i Ỹt-i + 0 K ∑ k=0 B(k; )X (m) t-k∕m + (m) � t. (30) Ỹt = ⟨ q (L 1∕m ), � z (n) •z (n-1) • ⋯ •z (1) � (S (m) t-1 )⟩. 1 3 Digital Finance (2023) 5:295-365 Pre-trained Transformer models such as BERT have achieved state-of-the-art performance on natural language processing tasks and have been adopted as feature extractors for solving downstream tasks such as question answering, natural language inference, and sentiment analysis. The current state-of-the-art Transformer based pre-trained models consist of dozens of layers and millions of parameters.
This stage produces an intra-daily timeseries of n-grams (n tokens), time-stamped and ordered, which we denote by {S (m) t }. In addition, construct a time-series of article sentences, which will be the input to the BERT and VADER models. • Stage 2: Construct the Entropy Sentiment time-series for each news source and combine them as described in Sect. 4. 3 to make the response time-series {Y t }. Then, construct the instrumental variable generative embeddings { Ỹt }, The advantage of this five-stage procedure versus a joint estimation of all components in one stage is that standard R and Python packages may be utilised to perform each stage of the estimation, which we have found to work adequately as outlined in the experimental results section (Sect. 6). (38) X (s,j) t = � q w s,j,q t X(s,j,q) t , w s,j,q t = n s,j,q t ∑ q n s,j,q t , 1 3 Below we add some further details on stages 3-5.
, 2014) ], or minimise an entropy measure ('perplexity') for a model that predicts the word that follows a given word sequence ('language modelling'), e. g. the Transformer-based BERT  (Devlin et al. , 2019)  that we also utilise in this work). For BERT, we used a pre-trained model based on an implementation from Hugging Face (https:// huggi ngface. co/ nlpto wn/, model: bert-base-multilingualuncased-sentiment), a group well-known in the NLP community for code quality. The model has been pretrained on a corpus of product reviews, yet we did not fine-tune, i. e. further train, the model with data from our domain for two reasons: first, to our knowledge there are no datasets of crypto-related public articles that have been annotated with sentiment labels, and second, we did not want to undertake this task as it would require manually annotating more than 3000 articles, which places such a process out of our research scope.
Model selection for finite-lag ARDL-MIDAS-Transformer time-series regressions Before proceeding with the analysis, we investigate the fitting of a wide range of model parametrisations with respect to the autoregressive lags, the covariates and the parameters of the Almon weight functions, which, for this study, was the Exponential Almon function. We adopt in this section the framework of infinite-lags in the ARDL structure, where we apply the Koyck-MIDAS transform to obtain a reparametrised model family as described in Eq. (  16 ) using the instrumental variable of Eq. (  30 ) constructed from BERT and VADER sentiment signals. Informed by previous research  (Chalkiadakis et al. , 2020) , we explored the options for the lag structure that are included in Table  3. In addition, we used all three different types of sentiment polarity (absolute sentiment strength, positive, negative), and explored a number of optimisation routines from the R package optim.
Conclusion In this work, we have proposed a novel class of time-series regression models that incorporate several relevant interpretable features: infinite-lag ARDL regressions, Mixed Data Sampling (MIDAS) multiple time resolution regression structures, Deep Neural Network architectures for Instrumental Variable design for reducing the estimation bias in the ARDL-MIDAS-Transformer class of models, and, finally, fractional integration in the form of Gegenbauer long memory polynomials for the MIDAS configuration. Each of these model components is carefully explained and detailed and then a thorough real data statistical analysis is undertaken on cryptocurrency market sentiment constructed daily from news articles. The daily sentiment is then regressed against intra-daily hourly closing price dynamics and money supply, as captured by mining Hash Rate.
Data availability Code and data for reproducibility purposes are available at https:// github. com/ ichal kiad/ ardlm idasd nn. Open Access This article is licensed under a Creative Commons Attribution 4. 0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Since these tools use human atlases, they can not be adapted to animals, due to the variability of their anatomy depending on the species. Other popular tools, even if not explicitly based on human atlases, make use of hyperparameters tuned on the human skull conformation. It is the case of the Brain Extraction Tool (BET) 11 , available as part of the FMRIB Software Library (FSL), and of FreeSurfer 12 , that makes use of Bayesian priors. The Brain Surface Extraction (BSE) tool integrated in the BrainSuite 13,14 is based on edge detection and morphological operations, such as erosion. The animal skulls, such as dogs' and cats' , have a larger amount of tissues surrounding the brain, and the boundary between the brain and the skull is not always well contrasted. This makes it hard to separate non-brain tissues based only on intensity and morphological operations.
Brain extraction algorithm. The VIBE algorithm uses an animal brain atlas to perform a fully automatic skull stripping on a brain MRI scan. The full workflow is illustrated in Fig. 1. For the canine population, we used the publicly available T1-weighted canine atlas published by Johnson et al. 20. It is a high-resolution probabilistic atlas: the presence of mixed-breed subjects makes it more prone to adapt to a variety of canine breeds. For the feline population, a T1-weighted atlas of the same author was chosen  22. The algorithm was written in Python, using especially the Python wrapping interface of the Insight ToolKit (ITK)  36  and scikit-image  37  as image processing libraries. Data preparation. First, the target image (Fig. 1a ) DICOM metadata were transposed to the atlas (Fig. 1b ): resolution, size, physical position and orientation of the atlas are set to be the same as those of the target image.
The Matlab code available on the authors' website (https:// sites. google. com/ site/ chuan glab/ softw are/ 3d-pcnn) was used. BET and 3DSS were run on a MacBook Pro (OS: macOS Monterey, CPU: 2GHz Intel Core i5 4 cores, memory: 16Gb, GPU: Intel Iris Plus Graphics 1536Mb), while 3D-PCNN was run on a workstation (OS: Windows 10 Professionnal, CPU: 2. 10GHz Intel(R) Xeon(R) Silver 4216, RAM: 96Go, GPU: Nvidia Quadro GV100).