dataesr/scientific-paragraphs-categorization huggingface dataset:
Data processing In order to attenuate the noise and improve the density resolution  [36] , binning 2 was applied on the raw projections prior to the reconstruction; thus, leading to an effective pixel size of 72 nm. Subsequently, a median filter with a radius of 2 pixels was applied over the normalized projections. Moreover, for minimizing the ring artefacts, potential horizontal stripes were removed from the sinograms by applying the Fourier-wavelet method  [37]. Tomographic image reconstructions were performed using the gridrec algorithm from tomopy  [38, 39]. The reconstructed volumes were analyzed with Fiji  [40]  image-processing package. The experimental resolution was estimated through the Fourier Shell Correlation with a half bit-threshold method  [41, 42] , while the stitching was performed by the NRStitcher software  [43]  (Visualization 1).
The histological analysis was performed on the same mouse kidney after the nanotomography scan, as it requires sectioning and staining of the sample. A histological image representative of the kidney cortex anatomy is illustrated in Fig. 2(e). A higher magnification view of the region within the black rectangle is displayed in Fig. 2 (f) allowing a better comparison with the data obtained by nanotomography. Figure  2 (e) shows a mixture of tubule cells (proximal and distal tubule cells) and glomeruli. The tubules are labelled in purple (eosin staining) and the nuclei appear violet in color due to the used staining reagents (hematoxylin staining), while the lumen is visualized in white. In contrast to histology, X-ray nanotomography offers the advantage of handling 3D information. Figure  3 (a) presents a 3D rendering of the tomographic images acquired from the kidney tissue.
In comparison to histology, however, the presented method enables a high-resolution morphological analysis of the tissues at short acquisition times, without staining and non-destructively. Finally, the relatively fast interior tomographic measurement of below 30 min per scan allows imaging multiple ROIs of the same sample, consecutively. Single volumes can be stitched together resulting in larger volumetric datasets. An example of such a stitched volume is displayed in Fig. 6  (Visualization 1). A 2D nanotomography slice obtained from the stitching of 4 reconstructed nanotomography slices is presented. The scans were performed with an overlap of 40 µm at a scan time of 15 min each. The whole volume of 100 x 100 x 74 µm 3 was performed in 1h. The stitched image shows a final cropped FoV equal to 101.
Acknowledgments The authors gratefully acknowledge the financial support from the  Deutsche Forschungsgemeinschaft (DFG, German Research Foundation )-Projektnummer 192346071,  SFB 986 , project  Z2. The authors thank  István Mohácsi  for the fruitful discussion and  Diana Krüger  and  Jörg Hammel  for their helpful advice on 3D segmentation. The authors also acknowledge the  P05  beamline staff for the technical support in performing the measurements.
However, for ML, commonly used platforms for RTHS such as Simulink and MATLAB have limited capacity when compared to Python for instance. Thus, the main focus of this study was to introduce Pythonbased advanced ML models for RTHS analytical substructures. Deep long short-term memory networks in Python were considered for advanced metamodeling for RTHS tests. The performance of Python can be enhanced by running the models using highperformance computers, which was also considered in this study. Several RTHS tests were successfully conducted at the University of Nevada, Reno, with Python-based ML algorithms that were run from both local PC and a cluster. The tests were validated through comparisons with the pure analytical solutions obtained from finite element models. The study also explored the idea of embedding the delay compensators within the ML model for RTHS.
g. ,  Mai et al. , 2016; Abbiati et al. , 2019; Miraglia et al. , 2020). Machine learning (ML) is one of the disciplines that have the potential to improve the capabilities and extend the possible range of applications of RTHS. Shortly, ML is the science of programming computers so that they can learn from the data  (Géron, 2017). ML has been used for many earthquake engineering applications, including seismic hazard analysis, system identification, damage detection, seismic fragility assessment, and structural control for earthquake mitigation  (Xie et al. , 2020). ML models can be grouped in many different forms such as grouping based on the tasks ML models are designed to solve, i. e. , classification, regression, and clustering. This study aims to set the stage for a new paradigm of RTHS testing that would use ML to replace finite element (FE) models to predict the analytical model response.
This new benefit is concerned with potentially eliminating the time delay between actuator input and feedback within the metamodel instead of using a time-delay compensator, which is investigated further throughout the article. Next, modeling and training assumptions for more complex and representative ML models are explained in detail. The advanced models are generated using LSTM networks, which are modeled in Python. A large number of ML research studies prefer Python as one of the most popular high-level programming languages that include many frameworks and large ML libraries. To our best knowledge, this article presents the first attempt that combines an advanced ML model within the RTHS loop. The article then focuses on the communication development and validations when Python-based ML models are introduced in the RTHS loop.
HS System Components The compact HS setup recently developed and assembled by the authors at the Large-Scale Structures Laboratory at the University of Nevada, Reno (UNR), is used for this study  (Bas et al. , 2020b). This small-scale setup has been developed for investigating computational challenges in substructuring (e. g. ,  Bas and Moustafa, 2020; Bas et al. , 2020a) , educational demonstrations, developing new substructuring concepts in HS/RTHS, and developing innovative approaches for computational substructures as discussed in this article. Figure  1  shows the components of the HS setup, which consists of the following: (1) a small-scale load frame with a dynamic actuator that is run by an isolated hydraulic pump; (2) MTS STS controller (MTS 493) with 2048 Hz clock speed; (3) real-time high-performance Simulink machine (Speedgoat xPC target); (4) Windows machine (host PC) for analytical substructures (such as MATLAB, OpenSees, or Python) and the HS middleware OpenFresco; (5) SCRAMNetGT ring that provides shared memory locations for real-time communication.
Modeling Assumptions and Training Dataset A one-story, one-bay steel concentrically braced frame (CBF) with diagonal brace configuration was selected for the verifications and evaluations in this study. CBFs are convenient for the substructuring where the columns and beams of CBFs can be modeled with high accuracy, i. e. , form the analytical substructure. Meanwhile, braces are better tested physically to accurately capture complex behavior such as buckling, and in turn, braces make the experimental substructure. A single small-scale brace can be tested as the experimental substructure in the used HS setup and can be combined with a prototype steel frame at full scale for the analytical substructure. For the sake of this study, a linear analytical model is first used, and then a heavily non-linear analytical substructure is considered for the advanced ML modeling.
, θ n are the feature weights). ŷ = θ 0 + θ 1 x 1 + θ 2 x 2 +. + θ n x n (1) The training dataset was obtained from a pure analytical dynamic analysis of the overall system. The brace displacement and force time histories were obtained in local coordinates and used as training datasets in addition to the ground motion acceleration (see Figure  3  for these training components). Because the dataset is provided offline, the model is considered as batch learning. In total, five input features were selected to train the model to predict the output, which would be the command displacement of the experimental substructure of the HS system. The training features were selected to be (i) ground motion acceleration, (ii) displacement feedback value of the brace (from experimental substructure), (iii) force feedback value of the brace (from experimental substructure), (iv) one previous step of the predicted displacement, and (v) two previous steps of the predicted displacement.
Because the pure analytical solution is used for the training dataset, an estimated 28-time-steps delay has also been considered to better represent the feedback that should come from the experimental substructure. However, to obtain a more accurate delay estimation better than the assumed 28-time steps, the trained model was run in the HS setup first without including the actuator's feedback, which were obtained to be used in the next training phase. Then, a more refined model was generated by using these "real" displacement and force feedback data with the other three features. A brief overview of how the LR training was conducted is as follows. In this study, the "Regression Learner" app in MATLAB, which is under the ML group, was used to train the LR algorithm. First, the predictors and response were defined, and then a validation method was selected.
The cross-validation with five folds was selected to protect the model against overfitting by partitioning the datasets into folds and estimating the accuracy of each fold. A session was started next for training, and an LR model was selected. Afterward, the model training was done, and the model root mean square error (RMSE) values were checked. Once the model was trained, the model was exported to the workspace to obtain the LR parameters to make new predictions. After getting the parameters, a Simulink model was generated to represent the HS case where at every step the predicted displacement is calculated, and the determined force feedback is fed back to the system to make new predictions.
RTHS Test Results Once the model is trained for the features explained above, a Simulink model with MATLAB function was prepared to represent the LR model but was first assessed against the pure analytical FEM solution. The developed LR model formulation is shown in Eq. 2, where x is represented as displacement of the brace, F is the force of the brace, and ẍg is the ground motion acceleration. Table  1  shows the model parameters that belong to the trained model. x prediction,i+1 = f. x g , x feedback,i , F feedback,i , x prediction,i , x prediction, i-1 = θ 1. x g + θ 2 x feedback,i + θ 3 F feedback,i + θ 4 x prediction,i + θ 5 x prediction,i-1 (2) TABLE 1 | LR model parameters. θ 1 θ 2 θ 3 θ 4 θ 5 -6. 51e-05 0 3. 46e-11 -0. 998 1. 997 The brace displacement response of the FE model and the prediction from the LR metamodel were compared as the two alternative pure analytical solutions.
So, the low error is not meant to assess the quality of LR metamodel predictions, but rather confirm the performance of the overall RTHS hardware and communication system. Such simple linear elastic case was possible to easily model with the LR algorithm, which was also simple enough to code using MATLAB and Simulink functions and directly compile it into the RTHS hardware. However, the modeling capacity of LR models is rather limited and cannot be used for complex non-linear systems. Thus, more complicated ML algorithms are likely to be used to push the boundaries of future RTHS testing, which motivated the next part of the study. More complex ML algorithms such as deep learning were considered, which required integrating Python into the RTHS loop. Developing the ML models for the next phase of validation is the focus of the next section, which is then followed by the communication schemes development and verification for RTHS with Pythonbased complex ML models.
The difference of the RNN from previously defined neural networks is these backward connections where the previous ones are feedforward neural networks. The architecture of the RNNs includes a recurrent neuron which receives the output from the previous time step with the input. This allows this type of network to be capable of time-series forecasting. Although it is successful in sequence datasets, the method has two main disadvantages for longer sequences: (i) unstable gradients and (ii) utilizing a very limited short-time memory  (Bengio et al. , 1994). To overcome these problems, the LSTM cell was proposed, which can detect long-term dependencies, rapidly converge, and perform better  (Hochreiter and Jürgen, 1997). In this study, the LSTM networks were selected and used for the purpose of modeling and dynamic response prediction of the analytical substructures needed for the sought communication schemes development and RTHS demonstration.
LSTM Networks The LSTM networks were developed, especially to answer the need in long sequence datasets. Figure  6A  shows a typical deep LSTM network, with input, hidden, and output layers. The architecture of an LSTM cell is shown in Figure  6B. In particular, an LSTM cell includes h (t) and c (t) apart from inputs (x (t) ) and outputs (y (t) ), which are representing short-and long-term states, respectively. In each time step, the LSTM cell receives two input vectors that are the current time step input vector x (t) and previous time step output vector h (t-1) (which is also y (t-1) ) and fed into four different fully connected layers. The output of g (t) analyzes these two inputs, which is the weighted sum of the inputs followed with an activation function (tanh function). A regular RNN cell only has this feature, which directly gives the output.
Training Datasets A similar one-story, one-bay steel braced frame as discussed in Simplified Machine Learning Model for RTHS, but with some modifications, was selected for this part of the study for generating training datasets. The analytical substructure was designed to be non-linear for the RTHS tests where this non-linear analytical substructure is to be represented with an advanced ML model. Again, the main goal of this fundamental study is to explore validity of using ML modeling for RTHS and develop/verify the needed communication schemes. Hence, the experimental element was selected to be linear elastic so that it can be still combined with the non-linear analytical substructure to obtain pure analytical solutions for validating the RTHS tests. The pure analytical model of the overall system was modeled in OpenSees  (McKenna et al.
, 2000) , which offers a wide range of material models, elements, and solution algorithms. The columns (W36 × 150) and beam (W14 × 311) elements were defined using fiber sections with non-linear material behavior as illustrated in Figure  7. The non-linear material behavior was defined with Steel02 material in OpenSees (Figure  7C ), which is uniaxial Giuffre-Menegotto-Pinto steel material with isotropic strain hardening  (Filippou et al. , 1983). The implicit Newmark method was used for all the conducted analysis to obtain the training dataset, and the parameters were set as γ = 0. 50 and β = 0. 25. The yield stress of the material was selected to be 345 MPa with modulus of elasticity of 200 GPa. On the other hand, the brace, which is the experimental substructure in the RTHS tests, was modeled to be linear elastic with axial stiffness of 278 kN/mm.
The 1940 El-Centro earthquake was selected again for this part. While the duration of the earthquake record is 31. 2 s, the analyses were carried out for full 32 s, which generated 1,600 data points for each response. The training dataset for the deep LSTM model of the nonlinear analytical substructure was selected to be the ground motion acceleration and brace force time histories. The brace axial displacement in local coordinates, i. e. , the scaled actuator command in the used substructured test setup shown in Figure  2 , was selected to be the output for the model training purposes. This is to be later sought as the ML model output or prediction when in the RTHS loop. Thus, the ML model used two inputs to give the brace displacement command prediction to the experimental substructure. It should be noted that, during an online RTHS test, the system is a closed-loop one, and the brace force is dependent on the predicted brace displacement.
25-g ground motion acceleration could be 26 kN instead of 25 kN because of the experimental errors. Thus, for the ML model to still predict the intended 25-mm displacement, it needs to have been trained that at 0. 25-g ground motion input, the force could be 25 or 26 kN or something else. For this purpose, additional force histories where generated using ± 5, ± 10, ± 15% of the brace force and were added to create the biased dataset. The original dataset along with the six conceived datasets with the added bias were stacked together for the overall training dataset. This required the same ground motion to be repeated seven times to go with the seven cases of force input to prepare the ML model that, for a given ground motion input, the force could   Once the training dataset is generated, it should be modified and reshaped to be able to train the LSTM model.
The input sequences of LSTM networks are formatted to be threedimensional (3D) arrays, as in other time-series prediction models  (Géron, 2017)  and as illustrated in Figure  11. The first dimension is the batch size or the number of samples of the dataset. The second dimension is the lookback, which defines how many past time steps that the model should get. Finally, the third dimension is the size of the input dimension or number of features. The lookback parameter is one of the key parameters that should be tuned carefully as it makes LSTMs more reliable because it allows the algorithm to look back in the past time steps to make better future predictions. Although it extends the used information, it might increase the memory requirements. On the other hand, the output shape can be either 2D or 3D arrays, which depends on the return sequences.
Implementation Methodology and Sensitivity Analysis for LSTM Model The deep LSTM model used in this study was trained and generated in the Python environment using Tensorflow 2. 0 framework, which is a high-performance computing library introduced by Google  (Abadi et al. , 2015). Tensorflow offers many packages and features, and one of the most popular ones it supports is Keras  (Chollet, 2015). Keras is a highlevel Application Program Interface that is highly attractive for building and training deep learning models. Generating workflows in Keras is simple because there are several standalone modules, such as neural layers, optimizers, cost functions, and user-defined modules. Thus, one can easily connect and stack these modules to generate an ML model. The inputs and output training datasets were fed into the deep LSTM models to tune the hyperparameters, i.
e. , size of the hidden layer, number of layers, number of neurons, batch size, lookback size, number of epochs, learning rate, etc. To train a large deep neural network, a faster optimizer should be used because the training time can take longer. The Adam (Adaptive Moment Estimator) optimizer was selected to train for the models used in this study, with a learning rate of 0. 001, because it is computationally efficient and well-suited for problems with large datasets  (Kingma and Ba, 2015). The number of epochs was set to be 10 3. Moreover, the model was trained to minimize the cost function defined in Eq. 9, which is mean square error (MSE) between the given displacement values (x n ) and the predicted displacement values (x n ). J (θ) = MSE = 1 N N n=1 x n -xn 2 (9) In this study, several layer numbers with different sizes of hidden layers were evaluated.
The models had an input layer, four LSTM layers with 30 units in each layer, and one dense layer, which is a fully connected layer that outputs the prediction. For these models, different lookback values, i. e. , 1, 5, 10, 15, and 20, were selected to select and fine-tune the most accurate model to be used as computational substructure in the RTHS loop. Moreover, 70% of the dataset was set to be the "training" part of the dataset, and the rest was used as the "test" dataset. The brace displacement response prediction values from the LSTM models with different lookback values were compared against the pure analytical model response. The performance of the model prediction was evaluated using the NRMSE, normalized energy error (NEE), and maximum amplitude error (MAE) given in Eqs 10 to 12. The NRMSE is an adequate way of evaluating the overall model performance, whereas the NEE and MAE are more focused on amplitude errors between the datasets.
COMMUNICATION DEVELOPMENT AND VERIFICATION One of the critical aspects of HS/RTHS is the proper data communication between the analytical substructure and experimental substructure. The UNR setup components and configuration information are given above in HS System Components. As mentioned earlier, the analytical substructure of the HS/RTHS tests can be modeled in either Simulink directly or in an FE software such as OpenSees along with a middleware such as OpenFresco  (Schellenberg et al. , 2009a). OpenFresco is a software that connects FE models to the controllers and data acquisition systems in laboratories to enable HS. It allows interfacing different computational drivers. In this study, a novel communication scheme was developed to connect the Python-based models to the HS/RTHS loop via OpenFresco as a middleware.
The authors have previous experience in developing and verifying new HS communication schemes that also used OpenFresco  (Moustafa and Mosalam, 2015a,b). To assess the online performance of the LSTM models in providing a prediction and in anticipation of future models that could be more complex and larger in size, two scenarios for calling the LSTM models were considered and tested. The first case used a local PC that was physically part of the RTHS, and the second considered a high-performance computing cluster. The communication details for Python-based metamodel substructures when located in local PC (host PC) are presented first. Figure  12  shows the hardware components and the communication details schematically. In this configuration, Python is located at the host PC, where the xPC connection and the SCRAMNetGT initializations are made.
Python can be run either from the command prompt (i. e. , python. exe) or Anaconda prompt or Jupyter notebook. The OpenFresco architecture for Python connection is the "client&middle-tier server, " where OpenFresco serves as a middle-tier server, and Python is the client. At the OpenFresco side, the server is started by opening a UDP/TCP channel, and the simulation application site is set. On the other hand, Python has a "socket" module to set the connection and send and receive data with either TCP or UDP protocols. In this study, the data communication between Python and OpenFresco is provided with the UDP communication protocol. The experimental site is also connected with this middle-tier server, which is a local experimental site in this study. Moreover, the experimental control, which is the interface with the laboratory hardware system, should be defined.
This is where the data to/from the controller through the xPC target are transferred. The connection between the host PC and the xPC Target can be set up with either TCP/IP or SCRAMNetGT connection. The SCRAMNetGT connection was considered here because it provides more stable and faster data transfer. The communication details when a high-performance computer cluster is considered are provided next. The cluster that has been used in this study belongs to UNR's Department of Computer Science and Engineering and used for teaching and simple research studies. Python packages and modules can be run from a cluster, especially when complicated calculations are needed to be done at high speeds. For this communication, Python models were run in the cluster, while OpenFresco is in the host PC. The cluster and the host PC were connected through the Secure Shell (SSH) network protocol.