Ship Detention Situation Prediction via Optimized Analytic Hierarchy Process and Naïve Bayes Model
Ship detention serves as an obligatory but efficient manner in port state control (PSC) inspection, and accurate ship detention prediction provides early warning information for maritime traffic participants. Previous studies mainly focused on exploiting the relationship between ship factors (i.e., ship age and ship type) and PSC inspection reports. Less attention was paid to identify and predict the correlation between ship fatal deficiency and ship detention event. To address the issue, we propose a novel framework to identify crucial ship deficiency types with an optimized analytic hierarchy process (AHP) model. Then, the Naïve Bayes model is introduced to predict the ship detention probability considering weights of the identified crucial ship deficiency types. Finally, we evaluate our proposed model performance on the empirical PSC inspection dataset. The research findings can help PSC officials easily determine main ship deficiencies, and thus, less time cost is required for implementing the PSC inspection procedure. In that manner, the PSC officials can quickly make ship detention decision and thus enhance maritime traffic safety.
Port state control (PSC) inspection aims at identifying various potential maritime traffic safety risks, and thus, the ships with fatal deficiencies are detained to avoid potential maritime traffic accidents [1, 2]. With the help of professional judgement, the PSC officials make ship detention decisions considering various observed ship technical deficiencies. Shipping company is forced to completely correct the deficiencies for the detained ship, which are identified in the PSC inspection reports. Both the PSC officials and shipping company hope to accurately determine ship deficiency, and thus, further measurements will be taken to improve maritime traffic safety and efficiency [3–5].
Though the PSC regime may vary in different countries, the PSC inspection regimes share the following points [6, 7]: (1) PSC officials inspect ships at lower risk with a larger time interval (i.e., fatal deficiency to be found from the ships with lower probability), and vice versa; (2) the PSC inspection procedure focuses on various factors (e.g., deficiency types, flag state, ship classification society, and shipowner), which may impose a potential but significant threat to maritime traffic safety [8, 9]. The ship detention decision is made after thoroughly inspecting the ship, which considers the weights of various observed deficiency factors. The empirical PSC inspection practice indicates that exploiting the close relationship between crucial deficiencies and ship detention can provide guidelines for quickly making ship detention decision. Our study aims to efficiently and accurately exploit the relationship, which can help maritime traffic participants (e.g., PSC officials and shipping owners) predict ship detention probability in real-world applications.
Many researchers focused on identifying the key factors, which impose important influences on ship detention decision [10–15]. More specifically, they attempted to exploit the correlation between the critical factors (i.e., ship age, ship type, and number of deficiencies) and ship detention rate from large-scale PSC inspection data, which were then used to estimate navigation risk level, probability of maritime incident, and ship detention rate. Hänninen and Kujala proposed two alternative Bayesian network algorithms as model construction, which indicated that ship type, number of deficiencies, and PSC inspection mechanism are the most important factors involving ship detention, maritime accident, etc. . Yang et al. proposed a data-driven Bayesian network-based approach to analyze risk factors (e.g., number of deficiency types, inspection type, recognized organization, and ship age) influencing PSC inspection results and predict the ship detention probability under different situations using bulk carrier dataset . After that, Yang et al. introduced company performance factor into the Bayesian network model to generate the comprehensive detention rate function and then established the game model between the port authorities and ship owners . Fan et al. established a Bayesian network model to investigate the factor impacts on ship navigation risk level and ship detention under different ship type dataset . Şanlıer analyzed the observed deficiencies of ships from detention records and found the main factors (ship age, ship type, flag state, etc.) . Xiao et al. applied a decision tree to conduct multifactor decision-making analysis and proposed a binary logistic regression to analyze detention decision under new inspection regime (NIR), and the results indicated that the ship age is the most important factor resulting in ship detention . Similar results are obtained in [21–26].
A few studies tried to analyze the intrinsic correlation between ship deficiency and ship detention and established prediction mechanism of ship detention probability, which provide the basis for decision-maker of PSC inspection for the purpose of preventing maritime traffic incident. Knapp et al. proposed a logistic regression model to identify deficiency and ship factors influenced the inspection results and explore the differences in ship detention . Chen et al. proposed a grey rational analysis model with improved entropy weight to identify key factors (i.e., deficiencies) from ship detention cases and put forward suggestions and countermeasures to reduce ship detention rate . Knapp and Chen only considered deficiencies (the number of deficiencies is not large) as key factors of PSC inspection results and determined the influence degree of factors. But they failed to propose a prediction mechanism that can accurately predict ship detention situation. In sum, previous research studies mainly focused on exploring the correlation between ship factors and ship detention and established the ship detention rate prediction mechanism.
We tried to exploit intrinsic ship deficiency correlations by analyzing ship detention cases from PSC inspection data . But it is important to predict ship detention incident for the purpose of enhancing maritime traffic safety and efficiency. To that aim, we proposed a novel framework to identify crucial ship deficiency types with an optimized AHP model and Naïve Bayes model, which was further employed to measure the occurrence probability of ship detention incident.
Our contributions can be summarized as follows: (1) we analyzed the weakness of the current PSC inspection methods in the real-world applications from the perspective of quantitative measurements; (2) to address the issue, we proposed a hybrid framework with Naïve Bayes model and an optimized AHP model to transform the empirical PSC knowledge into common rules (with the help of historical ship detention cases); (3) we verified the proposed framework performance via the empirical PSC inspection data, which were implemented in both qualitative and quantitative manners. The remainder of the paper is organized as follows. Section 2 introduces optimized AHP, Naïve Bayes model, and performance metrics in detail. Section 3 describes the data source and discusses the deficiency selection results and prediction results. Section 4 briefly concludes this study and provides potential future research directions.
In this study, an optimized AHP method is proposed to implement the target of selecting thirty deficiencies, and two types of Naïve Bayes model are further employed to accomplish the prediction of ship detention situation based on selection deficiencies dataset at different ship types. The workflow for the proposed framework is shown in Figure 1.
2.1. Optimized Analytic Hierarchy Process
The analytic hierarchy process (AHP) is a popular model in tackling multiobjective decision-making task, which is implemented with matrix operations and fuzzy quantification of qualitative indicators to determine the weight of elements. AHP has been widely used in the field of decision-making [30, 31], risk assessment [32, 33], etc. The AHP model selects crucial deficiency subcategories which are explained in detail as follows.
2.1.1. Establishment of Hierarchical Structure
The hierarchical structure of AHP consists of three hierarchies which are target hierarchy, criterion hierarchy, and project hierarchy (as shown in Figure 2). We aim to select deficiency subcategories, which play the most important role leading to ship detention. The parent ship deficiency category and deficiency subcategory (except the other deficiencies) can be set as criterion hierarchy and project hierarchy, respectively. In criterion hierarchy, the number with two digits is the code of parent deficiency category and the number with five digits is the code of deficiency subcategory in project hierarchy.
2.1.2. Constructing Judgement Matrix
Constructing judgement matrix is the key procedure of the AHP model, and the process is entrusting a number to every element by comparing the influence of factors at the same hierarchy and previous hierarchy. The judgement matrix can be expressed as follows:where is the assigned number. Note that the smaller the value, the greater the influence of this factor. Parameter is a reciprocal judgement matrix. Generally speaking, the number of factors at the same hierarchy and previous hierarchy is equal to or smaller than 9, and the comparing process is affected by human subjective factors. It may cause difficulty in determining ship deficiency level due to superfluous factors and excessive perceptual factors. To this end, we quantify the parameter and then generate the judgement matrix based on the probability of deficiency from the experimental dataset. The formula for calculating the probability of element is presented as follows:where represents the probability of element, is the number of times deficiency appears in the PSC inspection dataset, and represents the number of PSC inspected ships. The pseudocode for the proposed quantification method is shown in Algorithm 1.
2.1.3. Weight Calculation
The weight calculation procedure is to obtain the judgement matrix, where the eigenvector (corresponding to the maximum eigenvalue ) is the weight. It indicates the importance of this hierarchy of elements to the previous hierarchy of element. The expression for weight calculation can be shown as follows:where represents the weight of criterion hierarchy for target hierarchy, is the weight of project hierarchy for element in criterion hierarchy. For the final element selection, the combined weight demands to calculate, which represents the importance of project hierarchy elements for target hierarchy, and the calculation formula can be expressed as follows:
2.1.4. Consistency Check
The performance of the model needs to be verified after model establishment, and consistency check is required for the AHP model. The consistency index (CI) and consistency ratio (CR) are used to verify whether the judgement matrix meets consistency criterion. The formulas of CI and CR are shown as follows:when , the consistency of the judgement matrix is acceptable; otherwise, the judgement matrix should be modified appropriately. represents the mean random consistency index, and the value can be generated by randomly constructing 10000 sample matrices: construct the positive reciprocal matrix by randomly extracting numbers from 1 to 9 and its reciprocal, obtain the average value of maximum eigenvalue , and definewhere means the order of the matrix. The python code for calculating different orders of RI is available at https://github.com/shubowu/RI-of-AHP, and the result of different orders of RI is shown in Table 1. However, for the target of selecting thirty deficiency categories based on the combined weight, the random consistency check for combined weight should be verified as follows:
2.2. Naïve Bayes Model
Naïve Bayes is a classification method based on Bayes’ theorem and feature condition assumptions and it is widely used in different applications such as data prediction [34, 35], classification [36, 37], and data mining [38, 39]. Naïve Bayes model assumes that all attributes are independent of each other. More specifically, each attribute independently affects the classification results.
2.2.1. Bayesian Inference
For a given training dataset, represents attributes and contains -dimensional features (i.e., thirty deficiency subcategories), is the collection of class tags and contains categories (i.e., detention result). The expression for Bayes’ theorem can be represented as follows:where , in which is the prior probability and can be calculated based on the dataset. For the attribute conditional independence assumption of Naïve Bayes, conditional probability can be transformed as equation (10). And then, we substitute equation (9) into equation (10), and thus, equation (11) is obtained. The Naïve Bayes model is expressed in equation (12):
2.2.2. Estimation of and
The training process of the Naïve Bayes model is to estimate a priori probability and condition probability for each category based on the given training dataset. Considering the characteristic of independent identical distribution of sample data, the estimation of a priori probability can be expressed as follows:where means the number of samples of category in the given training dataset and is the number of training data samples. The discrete attribute is assigned with discrete values, which are 0 and 1, respectively. Moreover, the value 0 indicates that the deficiency does not exist in the ship (or PSC officer does not observe such deficiency during the inspection procedure). The value 1 indicates that the deficiency is found in the ship by the PSC officer. The estimation of condition probability can be represented as follows:where is the number of values in of attribute in the collection . However, the information carried by other attributes may be lost by attributes that are not present in the training dataset due to insufficient data. To this end, Laplacian correction is utilized to smooth a priori probability and condition probability during the estimation process and the correction formulas are shown as follows:where is the number of categories in the training dataset and represents the number of values of the attribute.
2.2.3. Performance Metrics
The detention prediction process using the Naïve Bayes model can be regarded as binary classification, and three evaluation metrics including accuracy , precision , and recall are adopted to evaluate the model prediction performance. The statistical indicators of , , and are shown as follows:where is the number of validation datasets, is the indicator function, and are the actual value of the element and its estimator, is true positive, is false positive, is false negative, and is true negative and . For comprehensively considering the performance of precision and recall and evaluating the performance of models, many times of experiment were implemented and macroscopic harmonic mean and microscopic harmonic mean are utilized to substitute for precision and recall to evaluate the model prediction performance, respectively. The formulas can be expressed as follows:where parameter measures the relative importance of recall to precision, and was set in this study. , , , and can be calculated using the following equations:
In this section, we aim to predict the detention situation based on the deficiency of ships in the PSC inspection process. Since there are many ship deficiency subcategories (i.e., 568 types of deficiency subcategories in the raw PSC inspection data), it is possible to obtain unsatisfied prediction accuracy due to trivial deficiency interference. To address the issue, we employed an optimized AHP model to select crucial deficiency subcategories, which are supposed to play important roles in making detention decisions of ships. For the purpose of model performance evaluation, multinomial Naïve Bayes (MNB) and Bernoulli Naïve Bayes (BNB) are adopted to predict the detention situation based on the selection deficiency subcategories.
We collected PSC data samples from the empirical Asia-Pacific PSC inspection data within five years (i.e., from January 2014 to December 2018). We have collected 10322 PSC inspection samples, and each data sample includes both fundamental ship information and ship deficiency types. More specifically, the fundamental ship information contains ship name, ship type, flag, detention state, number of deficiencies, etc. We have collected 568 types of ship deficiencies, and each ship deficiency is denoted as 0 or 1. More specifically, the ship deficiency is observed in the PSC inspection sample when the attribute value is assigned to 1, and vice versa.
3.2. Deficiency Subcategory Selection Analysis
The judgement matrices for the target hierarchy and criterion hierarchy were provided to further unveil the AHP modeling results. More specifically, Table 2 shows the judgement matrix for the target hierarchy. Table 3 shows the judgement matrix for the criterion hierarchy with cargo operations including equipment deficiency (code ID is 06), and Table 4 represents the judgement matrix for the criterion hierarchy with ISPS deficiency (code ID is 16). The parent ship deficiency types were classified as the basic elements for the criterion hierarchy elements, and the corresponding weights are shown in Table 5. It is noted that the deficiency item of certificate and documentation was assigned with a significantly larger weight (i.e., 0.3215) compared to other ship deficiency types. Such statistics indicated that ship crew without qualified certificates can directly result in ship detention, which is consistent with the real-world PSC inspection experience. Moreover, ships loading with dangerous goods may be detained, and the factor is assigned with weight 0.0357.
Table 6 shows the results with , CI, RI, CR, and check result of single hierarchy consistency check for each hierarchy. The result of hierarchy consistency check for the overall consistency check is acceptable (combined with the result of total hierarchy consistency check). From the perspective of CR indicator, the judgement matrices have satisfied consistency check criterion considering that each CR is smaller than 0.1. Additionally, each CR is smaller than 0.1, which confirmed the above analysis. The RI indicator ranges from 1.2241 to 1.7056, which indicated that the mean random consistency varied in a small interval.
Table 7 presents specific ship deficiencies which are supposed to be carefully inspected by PSC officials in practice (i.e., such deficiency can obviously result in ship detention case). It is noted that both seafarers’ employment agreement (code ID is 01220) and endorsement by flag state (code ID is 01214) are assigned with larger weights in the optimized AHP model, which are both 0.0829. More specifically, PSC officer is likely to make a ship detention decision when they observe such deficiencies. The lifebuoy relevant issues are considered as another type of critical ship deficiency which affects ship detention decision. By interviewing with many experienced captains and PSC officer, the determined ship type deficiency and the assigned weights are consistent with the real world, and thus, the results can facilitate the PSC inspection procedure.
3.3. Performance of Ship Detention Prediction
After the deficiency subcategory selection (i.e., influence factor reduction) with the optimized AHP model, the Naïve Bayes models (i.e., MNB and BNB) and hybrid Naïve Bayes model (i.e., MNB and BNB combined with optimized AHP, respectively) were employed to predict the detention situation of ships by using different ship types (i.e., general cargo/multipurpose ship with 3849 samples and bulk carrier with 2260 samples) data collected from the PSC inspection dataset. Note that 70% of samples were selected randomly as the training dataset, and the remaining 30% were used as the validation dataset. We implement the experiment in fifty times and three performance metrics (i.e., , , and ) are adopted to measure the model prediction performance and stability.
From the perspective of accuracy (see Figure 3), the distribution curves showed ups and downs with poor fluctuation. In general, reasonable prediction results were obtained and the results of a hybrid model combining Naïve Bayes model and optimized AHP showed better than the Naïve Bayes model without deficiency selection scheme. The main reason is that the deficiency selection procedure removed most of the inconsequential deficiency subcategories which will decrease the prediction accuracy. Comparing the prediction performance of two types of Naïve Bayes model, the results of the MNB model are significantly better than those of the BNB model (the mean of accuracy is 0.8946 and 0.8784 in general cargo/multipurpose ship, and 0.9290 and 0.9189 in bulk carrier, respectively).
It indicated that the distribution tendency of PSC inspection data is more similar to the MNB model and obtains satisfactory training performance. Additionally, we found that the model performance of bulk carrier outperforms that of general cargo/multipurpose ship. As shown in Table 8, and scores of the hybrid model combining optimized AHP model and MNB model is the largest of all ( and scores are both 03635 in general cargo/multipurpose ship, and 0.3151and 0.3148 in bulk carrier). It also illustrated that the prediction performance and stability of the hybrid model combining optimized AHP model and MNB model are superior to other models.
In this paper, we aimed at predicting the detention situation of ships by combining deficiency selection procedure and Naïve Bayes model using dataset from Asia-Pacific PSC inspection. Considering that trivial ship deficiency imposes an insignificant effect on the ship detention decision, we introduced an optimized AHP model to select thirty deficiency subcategories from 568 types of deficiency categories, which are input as the attributes of Naïve Bayes model. The experimental results provided the following conclusions: (1) the hybrid model combining Naïve Bayes and optimized AHP model can accurately predict ship detention results, which can help shipowners to take timely actions to repair ship deficiency in advance; (2) the MNB model (a type of Naïve Byes model) obtained better ship detention prediction accuracy compared to the counterparts of the BNB model; (3) additional PSC inspection samples can provide more intrinsic relations between ship deficiency and detention events and thus can further improve model prediction performance.
Though the proposed hybrid model combining Naïve Bayes model and optimized AHP model obtained satisfied ship detention prediction results, the following researches can be done to expand our work. First, it is found that deficiency categories determined by the proposed AHP model were not perfectly matched with the real world (i.e., slightly different from PSC inspection records). We can develop additional knowledge discovery models to explore more intrinsic ship detention patterns from the ship deficiency. Second, we can establish a correlation network between various ship deficiency types and integrate Bayesian network models to discover ship detention knowledge for the purpose of obtaining higher ship detention prediction accuracy. Third, we can enhance our model performance by introducing a self-adaptive mechanism for the purpose of updating ship deficiency weights. Last but not least, we have tested our model performance by identifying 30 crucial ship deficiency categories. We can further test our model performance under various number of crucial ship deficiency categories.
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare no conflicts of interest.
All the authors have contributed equally to this research work.
The authors would like to show their deepest gratitude for the data and technical support provided by Maritime Stereo Search and Rescue Center of Shanghai Maritime University. This work was supported by the National Natural Science Foundation of China (Grant nos. 51709167 and 61701299) and the Shanghai Committee of Science and Technology, China (Grant nos. 18040501700, 1829501100, and 17595810300).
C. Saengsupavanich, N. Coowanitwong, W. G. Gallardo, and C. Lertsuchatavanich, “Environmental performance evaluation of an industrial port and estate: ISO14001, port state control-derived indicators,” Journal of Cleaner Production, vol. 17, no. 2, pp. 154–161, 2009.View at: Publisher Site | Google Scholar
X. Yang, Y. Zou, J. Tang, J. Liang, and M. Ijaz, “Evaluation of short-term freeway speed prediction based on periodic analysis using statistical models and machine learning models,” Journal of Advanced Transportation, vol. 2020, Article ID 9628957, pp. 1–16, 2020.View at: Publisher Site | Google Scholar
D. J. Y. Tey, T. F. Gan, G. Selvachandran et al., “A novel neutrosophic data analytic hierarchy process for multi-criteria decision making method: a case study in kuala lumpur stock exchange,” IEEE Access, vol. 7, pp. 53687–53697, 2019.View at: Google Scholar
A. C. Lagman, J. Q. Calleja, C. G. Fernando et al., “Embedding naïve bayes algorithm data model in predicting student graduation,” in Proceedings of the 3rd International Conference on Telecommunications and Communication Engineering, pp. 51–56, Association for Computing Machinery, New York, NY, USA, Nov 2019.View at: Publisher Site | Google Scholar
E. M. M. van der Heide, R. F. Veerkamp, M. L. Van Pelt, C. Kamphuis, I. Athanasiadis, and B. J. Ducro, “Comparing regression, naive Bayes, and random forest methods in the prediction of individual survival to second lactation in Holstein cattle,” Journal of Dairy Science, vol. 102, no. 10, pp. 9409–9421, 2019.View at: Publisher Site | Google Scholar
W. Chen, X. Yan, Z. Zhao, H. Hong, D. T. Bui, and B. Pradhan, “Spatial prediction of landslide susceptibility using data mining-based kernel logistic regression, naive bayes and rbf network models for the long county area (China),” Bulletin of Engineering Geology and the Environment, vol. 78, no. 1, pp. 247–266, 2019.View at: Publisher Site | Google Scholar
U. Mavani, V. B. Lobo, A. Pednekar, N. C. Pereira, R. Mishra, and N. Ansari, Naïve Bayes Classification on Student Placement Data: A Comparative Study of Data Mining Tools, in Information and Communication Technology for Sustainable Development, Springer, Singapore, Singapore, 2020.