Port state control (PSC) inspections are crucial for maritime safety and pollution reduction. The inspection process involves identifying high -risk vessels, allocating surveyors, and conducting onboard checks. This study aims to optimize the selection and assignment process through a two -stage framework, balancing the benefits of identifying deficiencies against the costs of inspection delays. Initially, we employ a predict -thenoptimize approach, predicting the number of vessel deficiencies using a k -nearest neighbor (kNN) model, which informs the inspection decisions. However, due to the nonlinear nature of the optimization in relation to predicted values, we also explore an estimate -then -optimize framework that estimates distributions of potential deficiencies. We enhance two prescriptive analytics models and introduce an advanced global model with a pre-processing algorithm for better distribution estimation. A case study using data from the Hong Kong port demonstrates that the estimate -then -optimize models surpass the predict -then -optimize approach, offering solutions closer to the optimal policy. Furthermore, our improved model outperforms existing methods, proving more effective in practical applications.