## 5 Development of the ANFIS Model and the Framework  
ANFIS is a combination of the computational power of ANN and the high-level reasoning capability of an FIS [78], which is developed in [79]. In other words, by inserting the FIS into the framework of adaptive networks, we receive the ANFIS architecture [80; 81]. Owing to the effective learning and reasoning competence of the ANFIS model, it has received growing interest from academics in numerous engineering and scientific fields. In the literature, different models implement different learning structures for many applications and surveys [82; 83; 84; 85]. The ANFIS model is utilised in problems connected to parameter identification. This is achieved through a hybrid-learning rule combining back-propagation, gradient descent, and a least-squares method. It is a multilayer feed-forward network that employs an ANN and FLS to map inputs into an output see Figure 2. Therefore, it is an FLS implemented in the structure of an adaptive ANN. Furthermore, ANFIS can construct a network realisation of IF/THEN rules [80]. One of the earliest works in the identification risk literature was completed by [86]. Moreover, for the assessment of risk factors in highway management corporations in China, a back-propagation ANN was used [87]. The output is predicted through an adaptive network, which feeds forward multi-layers of ANN with adaptive nodes. Learning rules are specified for the parameters of the adaptive node and the adjustment of the parameter depends on error values [83; 88]. In this work, we use the ANFIS as a smart method or tool for risk prediction and to train on station risk levels as it has been indicated that the model can be utilised to assess risk during a small computational time [89]. We have developed the model for predicting the overcrowding risk, but it can be applied to other risk factors with different indicators. Besides, the suggested tool is used to assess the ISFMR by using overcrowding risk in stations, which supports future smart risk management. The ANFIS is a hybrid method that has several features of interest. For instance, the ANN can identify patterns in advance using the adaptation to the environment with its learning ability. At the same time, the FLS can combine expert judgment and perform the decision-making process [90]. The ability to handle historical data as well as expert knowledge whilst being flexible to adapt to unusual risky circumstances are important the features of the ANFIS model. Moreover, the model has been employed in emergency management, and analyses of external environments and level of threats [91]. The system is described as smart because of the parameters and fuzzy rules, which are estimated by ANN intelligently [92]. The method utilises supervised learning on a learning algorithm. It consists of five layers with two or more ANFIS inputs (X, Y), which are transformed into fuzzy inputs in Layer 1 (the adaptive node or fuzzification layer), as shown in Figure 3.  
Then, the process generates membership functions (MFs) for each of the inputs. There are many MF types, for instance, triangular MF, generalized bell MF, and Gaussian MF. In this study, various MFs have been examined [59; 93; 94]. Figure 3: ANFIS architecture of a two-input model with four rules. Figure 2: Proposed Fuzzy logic inference system for risk management in railway stations. The method of fuzzy output clarification is used in Mamdani-type inference systems, whereas the weighted average is used in Sugeno-type inference systems [95]. The ANFIS is a Sugeno-type inference system and is a hybrid method that utilises parallel calculation and the learning ability and FLS features of ANN [96]. Regarding fuzzy identification, a Sugeno-type of fuzzy system is the most common MF. To determine the relation between input and output in the ANFIS model, two algorithms are used, namely error backpropagation and hybrid learning. The ANFIS uses the learning ability of ANN for determining input and output spaces.