# Exploring Boost Efficiency in Text Analysis by Using AI Techniques in Port Companies
## 3 Methods
### Machine Learning Techniques
#### 3.1.1 Supervised Learning  
1. **Recurrent Neural Networks (RNNs). ** RNNs are a class of supervised learning algorithms designed to process sequential data by capturing temporal dependencies. They achieve this by maintaining information from previous states in hidden layers, which is essential for understanding dynamic patterns over time [49] (Equation (1)): \[h_{t}=\sigma(W_{h}x_{t}+U_{h}h_{t-1}+b_{h})\] (1) Here, \(h_{t}\) represents the hidden state at time \(t\), capturing information from the current input \(x_{t}\) and the previous hidden state \(h_{t-1}\). This mechanism allows the RNN to integrate prior data, with weight matrices \(W_{h}\) and \(U_{h}\) influencing the input and the transition from one state to the next, respectively, while \(b_{h}\) serves as the bias. The output at time step \(t\) is given by \[y_{t}=\phi(W_{y}h_{t}+b_{y})\] (2) In this equation, \(y_{t}\) is the output, \(W_{y}\) is the weight matrix linking the hidden state to the output, \(b_{y}\) is the bias and \(\phi\) represents a task-specific activation function, such as softmax for classification or identity for regression. The process demonstrates how an RNN uses the present inputs, \(x_{t}\), and previous states, \(h_{t-1}\), to generate a new hidden state, \(h_{t}\), which serves as a \"memory\" and influences the subsequent output. In the present study, the selection of RNN over alternative sequential models, such as LSTM, is substantiated by its efficacy in capturing short-term dependencies, a critical aspect of the dataset under consideration, wherein the sequences are not extensive. While LSTMs are regarded as superior in terms of learning long-term dependencies and circumventing issues such as gradient disappearance, in this study, RNNs are preferred due to their simplicity and lower computational cost. This choice enables faster processing and reduced resource utilization. 2. **Multi-Layer Perceptron (MLP). ** The Multi-Layer Perceptron (MLP) is a neural network architecture designed for both classification and regression tasks. It consists of multiple layers of interconnected neurons that systematically process input data. The transformation of an input vector \(\mathbf{x}\) through each hidden layer is defined as follows [50]: \[\mathbf{z}^{(l)}=f\Big{(}\mathbf{W}^{(l)}\mathbf{z}^{(l-1)}+\mathbf{b}^{(l)} \Big{)}\] (3)Here, \(\mathbf{z}^{(0)}=\mathbf{x}\) is the input, \(\mathbf{z}^{(l)}\) is the output of the layer \(l\) (where \(l=1,2,\ldots,L\)), and \(\mathbf{W}^{(l)}\) and \(\mathbf{b}^{(l)}\) are the weight matrix and the bias vector, respectively, while \(f\) is a nonlinear activation function. The output layer generates the final output \(\mathbf{y}\) as follows: \[\mathbf{y}=f_{\text{out}}\Big{(}\mathbf{W}^{(L)}\mathbf{z}^{(L-1)}+\mathbf{b }^{(L)}\Big{)}\] (4) where \(f_{\text{out}}\) is an activation function chosen based on the task, such as softmax for classification or identity for regression. 3. **Support Vector Machine (SVM)**. The Support Vector Machine (SVM) is a supervised learning algorithm that constructs a hyperplane to maximize the separation between two classes of data. The model is trained on a dataset represented as \((\mathbf{x}_{i},y_{i})\), with \(i=1,2,\ldots,n\), where each \(\mathbf{x}_{i}\in\mathbb{R}^{d}\) is a feature vector and \(y_{i}\in\{-1,+1\}\) indicates the class label, defined by the following [51]: \[f(\mathbf{x})=\mathbf{w}^{T}\mathbf{x}+b=0\] (5) where \(\mathbf{w}\) is the weight vector orthogonal to the hyperplane and \(b\) is the bias term. To ensure accurate classification, the model enforces the following: \[y_{i}(\mathbf{w}^{T}\mathbf{x}_{i}+b)\geq 1\quad\forall i\] (6) This condition ensures that all data points are correctly classified while maintaining a margin between the hyperplane and the nearest data points. The classification of new instances is determined by \[\hat{y}=\text{sign}(\mathbf{w}^{T}\mathbf{x}+b)\] (7) (iv) **Decision Tree for ML (DT)**.