Dive into the world of Natural Language Processing! Explore cutting-edge NLP roles that match your skills and passions.
Explore NLP JobsWe built a machine learning model to predict which shipping vessels are likely to be held in detention. The model made it into the shortlist of the Singapore Ocean of Opportunities AI Track, an internationally renowned event where competing companies aim to build AI solutions for the shipping industry. So what can machine learning deliver for the shipping industry?
An AI predicting the risk of detentions for vessels in the Asia Pacific region. This is an example of how AI can transform shipping.
At the start of the current coronavirus outbreak you may have read about the British-flagged cruise ship Diamond Princess, which was quarantined in Yokohama after some passengers tested positive for Covid-19.
The Diamond Princess. Source: Wikipedia
In fact vessels of all types are liable to be detained if they fail an inspection by port authorities. The UK detained two vessels in January 2020: the Latvian flagged Liv Greta, detained for inadequate lifeboat and safety compliance, and the Nigerian flagged MV Jireh, for failing to meet safety and welfare standards.
The risk of detentions is a problem for shipping companies as disrupted journeys cost money. In addition there is a human cost. Nine Russian crewmen were stranded off the coast of England in February without supplies when the MV Jireh was detained.
When a company sends a container over sea, they need to choose a vessel which is less likely to be held up at a foreign port. Ship registries currently classify ships into high, medium and low risk, based on a human-defined set of rules about how many defects were found on previous inspections.
Fast Data Science - London
A goldmine for machine learning in the shipping industry: Ship inspection records for 29 January. The column on the far right shows the current categorisation of the vessel into high, medium or low risk, determined by the Tokyo MOU. This is the categorisation currently used in the industry.
Since machine learning has been disruptive in a number of other industries, I have tried training a machine learning model to predict vessel detentions for the shipping industry.
Fortunately it’s possible to download information on past inspections in the Asia Pacific region from a number of sources on the internet for free. I downloaded data on 21,000 vessels for 2017, 2018 and 2019 and used Microsoft Azure ML to train a model to learn what it is that makes a vessel prone to detention.
You can tell this AI everything you know about a ship and it will give you a probability of the ship being detained.
I found that the most important factor used by the AI was the country that the inspection takes place. The next most informative indicator is the number of deficiencies that were uncovered in previous inspections at other ports. Of particular interest are the state of the ship’s watertight condition, its fire safety adherence and life saving appliances.
Feature importances for AI model for predicting vessel detentions in the Asia Pacific region. The bars show which aspects of a vessel’s history tend to indicate a high likelihood of detention. In fact the country of the inspection is a big factor, also the vessel’s flag, and the history of non-detention deficiencies discovered on previous inspections.
So if you wanted to assess a ship’s likelihood of detention, you would consider first the country that it’s calling at, and look at past records of any leaks, fire safety issues and life saving equipment.
To evaluate the model I have used ROC curves and Area Under the Curve (AUC) rather than accuracy, as detentions are a very rare event and ROC/AUC allow us to measure how good we are at distinguishing relatively high and low risk vessels.
In terms of the model performance, the current vessel classification system of high/medium/low gives an AUC of 0.66, whereas my model gave an AUC of 0.80. This means the model has much more predictive power than the current system.
ROC curve for the machine learning model vs. the current vessel classifications. If you would like to know how to interpret ROC curves please see my post on AI for healthcare.
I deployed the model at a temporary URL, where it was possible to view in real time the high risk vessels currently in the port of Singapore and you can experiment by calculating the risk of a vessel.
A vessel inspection also involves producing a PDF of free text describing all aspects of the vessel. Unfortunately these documents aren’t publicly available, however it would be possible to also train a model to predict a vessel’s seaworthiness from this text document using natural language processing.
Any shipping or forwarding company would be able to integrate this kind of model into their systems in order to quantify the risk of detentions on their shipments. The cost savings for a business would be enormous.
If you have a similar problem in your industry where you think AI could help, I am interested to hear from you. Please add your ideas in the comments below or contact me with your ideas.
Dive into the world of Natural Language Processing! Explore cutting-edge NLP roles that match your skills and passions.
Explore NLP JobsHow to look up UK company data from company names (video) Imagine you have a clients list, suppliers list, or investment portfolio…
Unstructured Data in Healthcare with NLP Introduction In today’s digital healthcare landscape, data plays a pivotal role. However, while medical records, patient feedback, and clinical research generate vast amounts of information, not all of it is easy to manage or analyze.
What we can do for you