## 5 Conclusions  
Understanding vessel behavior within navigational channels is of paramount importance. These channels are critical passageways for maritime navigation, and comprehending the behavior of vessels of various types and sizes within these channels is essential for enhancing navigational safety, optimizing channel utilization, and reducing environmental impact. To address these needs, this study employs machine learning techniques to develop regression models that predict vessel behavior within navigational channels based on historical AIS data. The models accurately predict vessel position, heading, and speed at specific time intervals within the channels. Vessel behavior in navigational channels is influenced by factors such as vessel size, type, draft, and proximity to berths. Using data from the navigational channels of Tianjin Port in China, this study applies Decision Trees, Gradient Boosting Regression, and Random Forest methods to model vessel behavior within these channels. The key findings are as follows:  
* The Random Forest method outperforms both Gradient Boosting Regression and Decision Tree models in predicting vessel behavior within navigational channels. After hyperparameter tuning, the model achieves optimal performance with n_estimators set to 300, max_depth to 35, min_samples_split to 2, and min_samples_leaf to 1. * Through feature importance analysis, it is determined that vessel width, draft, and vessel type have low importance in the model. A comparison between models with and without these features shows minimal changes in mean squared error (MSE) and adjusted \(R^{2}\), indicating that these features can be omitted to reduce model complexity and training costs without significantly affecting performance. * Analyzing the prediction errors for longitude, latitude, heading, and speed on the test set, the Random Forest model consistently shows the lowest MSE, with values of 2293.859, 6790.852, 6.071, and 33.242, respectively. Compared to Gradient Boosting Regression and Decision Tree models, the MSE is reduced by 65.1%, 50.6%, 60.5%, and 54.4%, respectively, and by 69.1%, 40.1%, 43.5%, and 64.2%, respectively. * The study validates the models using complete trajectories of two vessels of different sizes, types, and berthing locations, along with predictions of speed and heading at each trajectory point. The Random Forest model demonstrates superior performance in accurately predicting vessel behavior within the navigational channel. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Position** & **COG** & **SOG** \\ \hline Random Forest & 422.5002 & 1.2202 & 0.0023 \\ Gradient Boosting & 8571.1916 & 132.4752 & 0.0401 \\ Regression & 1,010,341.8 & 11,931.0257 & 3.2384 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: A general cargo vessel’s prediction Error Summary (MSE). Figure 15: Predictions for the General Cargo Vessel (Length 115 m, Beam 20 m, Draft 9.3 m): (a) Position Prediction; (b) COG Prediction; (c) SOG Prediction. The study proposes a Random Forest regression method for ship behavior research within fairways, which effectively predicts ship position, speed, and heading in the fairway. This model is significantly helpful for risk management and vessel scheduling within the fairway. Particularly in predicting and calibrating speed and course changes for different types and sizes of vessels during berth approach and departure, as well as estimating the time required for port entry and exit. This model can predict vessel behavior in fairways, providing support for VTS in managing maritime traffic and can be used to ship collision avoidance. This study's dataset is primarily based on vessel traffic data from Tianjin Port. In the future, the dataset's scope can be expanded to include data from different types of ports, different seasons, and varying weather conditions, to enhance the model's generalization capability.