# DDTree: A Hybrid Deep Learning Model for Real-Time Waterway Depth Prediction and Smart Navigation
## 3 Domain Analysis and Definition of Conceptual Model
### Decision Tree  
The waterway depth data are predicted through the hybrid model of a decision tree and a deep neural network (DNN). Similar hybrid models combining the models from different subdomains of machine learning have been proven successful for solving various classification and regression tasks [37; 38]. The DDTree model is composed of two parts. The decision tree is responsible for selecting different attributes of the static data and dynamic data in the AIS data and selecting the optimal attributes. The DNN is responsible for processing the optimal attributes and generating prediction of waterway depth data. The waterway depth data are used as supervised data to establish a model for prediction of waterway depth. Figure 3 shows a structure of the hybrid DDTree model. Each non-leaf node in the decision tree represents an attribute of the AIS data with which to judge whether the leaf node belongs to a certain range [39], as is shown in Figure 3. Each branch of a tree represents the output of an attribute over a range of values, which is used to indicate the output value under the corresponding judgment. After evaluating the static and dynamic AIS data in the decision tree, the information gain of different features can be determined, and the correlations between different features and predictive variables can be judged. Figure 3: The structure of the hybrid DDTree model. Ship attributes are taken from AIS. Depth data for DDTree model input are taken from Global Mapper. Figure 2: Flow chart of the waterway depth prediction using the proposed DDTree model. In the root node, we select the attribute in the AIS dataset that accurately decides the waterway depth in the electronic ECDIS chart. The remaining attributes are sorted according to their discriminating value and included in the output branches until reaching the final leaf node of the decision tree. The final left generates the output of the entire decision tree in the DDTree model. After preprocessing AIS data, the optimal attributes in the AIS data are selected as the input for a DNN using the attribute selection method in the decision tree, by comparing the information gain from each attribute. This avoids selection of data with little influence on prediction, thus making the entire model responsive when estimating waterway depth. The information entropy info(\(\mathbf{D}\)) must be calculated in order to build a decision tree. Here info(\(\mathbf{D}\)) is the entropy in the training dataset extracted from the AIS data calculated as in Equation (1):  
\[\text{info}(D)=-\sum_{i=1}^{m}p_{i}log_{2}p_{i} \tag{1}\]  
Here \(\mathbf{p_{i}}\) represents the probability that the i-th data category appears in the training tuple. Assuming that training AIS dataset \(D\) is split by attribute \(A\), the information expectation of \(A\) to \(D\) partitioning is expressed by Equation (2):  
\[info_{A}(D)=\sum_{j=1}^{v}\frac{\left|D_{j}\right|}{\left|D\right|}info\left(D _{j}\right) \tag{2}\]  
We calculate the information gain for the difference between the two datasets by Equation (3):  
\[gain(A)=\text{info}(D)-\text{info}_{A}(D) \tag{3}\]  
After calculating the information gain of each attribute, the set of the first \(\mathbf{k}\) attributes with the largest information gain is selected by the DDTree model as the optimal attribute set \((\mathbf{X_{1}},\mathbf{X_{2}},\dots,\mathbf{X_{k}})\). The algorithm in the decision tree is used to classify the waterway depth in the entire dataset. Then the decision tree is used to select optimal attributes as inputs for the neural network. The characteristics of AIS data include the static and dynamic characteristics of ships. Among them, the static characteristics of a ship include the draft of the ship, the length of the ship, and the breadth of the ship. The dynamic characteristics of the ship include data varying momentarily during the movement of the ship, such as the data of the ship's speed over ground (SOG) and the steering rate.