# Multi-Source Data Fusion for Vehicle Maintenance Project Prediction
## 3 Method
### Multi-Source Data Deep Fusion Network
#### 3.4.2 Representation of Data Fusion from Multiple Sources  
The base information of the vehicle includes location, manufacturer, type, engine type, engine displacement, model year, production year, and assembly plant. These factors significantly influence the development of the vehicle's maintenance project. Consequently, it is imperative to incorporate the aforementioned vehicle base information into the vehicle maintenance project prediction model. This integration effectively enhances the accuracy of the prediction process. The specific implementation is outlined as follows.  
To begin with, the base information \(B=\{B_{1},B_{2},\ldots,B_{n}\}_{n=8}\) are transformed utilizing the representation functions \(Em_{1}(B_{i})\) and \(Em_{2}(B_{j})\) to acquire \(S=\{S_{1},S_{2},\ldots,S_{n}\}_{n=8}\). The representation functions and corresponding outputs for each base information are illustrated in Table 2.  
Let us consider a variable \(X\) comprising \(n\) categories, denoted as \(X_{i}\) for the \(i\)-th category. Through \(Em_{1}\), each category is converted into a binary vector of length \(n\), where only one element is assigned the value of \(1\) while the remainder are set to \(0\). Precisely, the representation result for the \(i\)-th category is outlined in Equation (7):  
\[Em_{1}(X_{i})=[0,0,\ldots,1,\ldots,0]\]where the length of the vector is \(n\), the \(i\)-th element is \(1\), and the rest of the elements are \(0\). \(Em_{2}\) is defined as in Equation (8):  
\[Em_{2}(B_{i})=W_{e}(Em_{1}(B_{i}))^{T} \tag{8}\]  
\(Em_{2}\) maps discrete features onto a more meaningful lower dimensional space based on \(Em_{1}\), where \(W_{e}\in\mathbb{R}^{d\times n}\) is a parameter matrix and \(d\) denotes the dimension of the low-dimensional space. Using \(Em_{1}\) and \(Em_{2}\), the results of each base information representation are spliced in order to obtain \(U=[S_{1},S_{2},\dots,S_{8}]\).  
For the categorical data in the model, we employ one-hot-based encoding and multi-hot vector encoding. For numerical data, we apply an embedding function, \(F_{2}(M_{t})\), to map it to the same vector space as the categorical data. Utilizing different encoding methods enables the model to consider a wide range of factors, thus enhancing its ability to accurately predict upcoming maintenance projects by utilizing various vehicle characteristics and history.  
To seamlessly incorporate the vehicle base information into the maintenance project prediction task, we set \(U\) as the query vector and \(E\) as both the key vector and value vector. These vectors are then fed into the attention mechanism, yielding the representation result \(L\) for the vehicle's base information \(U\), as well as the historical mileage fused attention representation \(E\). The specifics of this implementation are outlined in Equation (5). Subsequently, \(L\) and \(U\) are concatenated to generate the representation result \(H=[L,U]\) for the vehicle. The final maintenance project prediction result \(\widehat{y}\) is obtained through the vehicle representation result \(H\). The specific implementation process is shown in Equation (9):  
\[\widehat{y}=\text{Sigmoid }W_{m}\text{ dropout}(H)+b) \tag{9}\]  
where \(W_{m}\in\mathbb{R}^{|P|\times d_{H}}\) and \(b\in\mathbb{R}^{|P|}\) are parameters, and \(d_{H}\) is the dimension of \(H\). To minimize the risk of overfitting during the prediction process, a dropout operation is performed before \(H\) makes the prediction.