# Deep-Learning-Powered GRU Model for Flight Ticket Fare Forecasting
## 3 Methodology
### Long Short-Term Memory  
Recurrent Neural Networks (RNNs) have gained popularity in the field of machine learning for their ability to model sequential data. In RNNs, information is propagated through a chain of connected nodes, with the input sequence data processed in the direction of sequence evolution [39; 40]. RNNs have the inherent capacity to memorize and incorporate past information, which has led to their successful application in time series prediction. However, despite the potential of RNNs, their performances can be affected by \begin{table}
\begin{tabular}{c c} \hline \hline
**Features** & **Description** \\ \hline Travel Date & The date on which the passenger is scheduled to travel \\ \hline Booking class & The letter code used by the airline to identify the fare type and restrictions of the ticket purchased by a passenger \\ \hline Class of Service & The class of service for the flight (economy, business) \\ \hline Seg Orig. & The origin or starting point of the travel segment \\ \hline Seg Dest. & The destination or endpoint of the travel segment \\ \hline Distance in Miles & The distance in miles between the origin and destination of the travel segment \\ \hline Duration in Hours & The duration of the travel segment in hours \\ \hline Duration in Minutes & The duration of the travel segment in minutes \\ \hline Airline Code & The code of the airline operating the flight \\ \hline Total stop & The total number of stops or layovers involved in the travel segment \\ \hline Op Flt Num & The operating flight number of the airline that is providing the travel segment \\ \hline Flight Type & The type of flight, such as domestic, international, or connecting \\ \hline Pax & The number of passengers traveling on the booking \\ \hline Weekend & Whether the travel segment falls on a weekend or not \\ \hline Holiday & Whether the travel segment falls on a holiday or not \\ \hline Season & The season during which the travel segment takes place, such as summer, winter, autumn, or spring \\ \hline Marketing Airline Code & The code for the airline that is marketing the flight \\ \hline Point of Ticket Issuance & The location where the ticket was issued \\ \hline Actual Fare & The actual fare or cost of the travel segment \\ \hline \hline \end{tabular}
\end{table} 
Table 4: A few selected features used in the fare prediction model. certain factors. When the length of the input sequence increases, for example, the network layers greatly expand, which usually leads to the problem of gradient vanishing [41]. Long short-term memory (LSTM) is a type of recurrent neural network with a deep architecture [42; 43]. Its unique gate mechanism and structure significantly enhance the model's memory capacity and alleviate the problem of gradient disappearance that is often encountered when training classical RNNs on very long input sequences [44]. Figure 4 depicts the network layout of one neural unit of LSTM. The LSTM neural network is composed of several gates and variables. The input gate, \(i_{t}\), regulates how much new information is added to the cell state at each time step. The forgetting gate, \(f_{t}\), determines how much information from the previous cell state should be retained. The output gate, \(o_{t}\), regulates how much information should be output from the current cell state. The input channel state, \(\widetilde{x}_{t}\), is obtained by compressing the messages from the input state, \(x_{t}\), and the previous hidden state, \(h_{t-1}\), with the \(tanh\) function, and might be added to the cell state, under the control of the input gate \(i_{t}\). The cell state \(c_{t-1}\) denotes the long-term memory in general that could be forgotten through the forgetting gate, \(f_{t}\).