Can machine learning transform the shipping industry?

· Thomas Wood
Can machine learning transform the shipping industry?

Unlock Your Future in NLP!

Dive into the world of Natural Language Processing! Explore cutting-edge NLP roles that match your skills and passions.

Explore NLP Jobs

We 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?

A machine learning model running in a web interface to predict vessel detention risk

An AI predicting the risk of detentions for vessels in the Asia Pacific region. This is an example of how AI can transform shipping.

The problem of ship detentions in the industry

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 British vessel Diamond Princess

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

Need a business solution?

NLP, ML and data science leader since 2016 - get in touch for an NLP consulting session.
A goldmine for machine learning in the shipping industry: A screenshot of ship inspection records from the Tokyo MOU, showing which vessels were classified as high, medium or low risk. These risk values are manually calculated at present.

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.

Building a machine learning model to predict risk for the shipping 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.

Can the shipping industry machine learning model explain detention risk?

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.

The machine learning model's feature importances. The most important feature is the country of inspection.

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.

How does the machine learning model perform in numbers?

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.

A ROC curve showing the performance of the machine learning model vs the performance of the current manual method of determining detention risk. The machine learning model outperforms the manual model.

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.

Try out the machine learning model

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.

Further improvements

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.

Value of machine learning for the shipping industry

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.

Find Top NLP Talent!

Looking for experts in Natural Language Processing? Post your job openings with us and find your ideal candidate today!

Post a Job

Join us at Google London with AI Camp
Ai in research

Join us at Google London with AI Camp

Upcoming Tech Talk: GenAI and LLMs night at Google London on 10 December 2024 Fast Data Science will present the open source AI tool Harmony at the upcoming GenAI and LLMs night at Google London on 10th December organised by AI Camp at Google Cloud Startup Hub.

What is an AI hackathon and how can I join one?
Ai for businessAi in research

What is an AI hackathon and how can I join one?

Image above: the winning teams and participants in the Harmony AI hackathon on 3 June 2024 AI Hackathons: A Playground for Innovation What is an AI hackathon?

Harmony training workshop
Ai in research

Harmony training workshop

Transforming data management with Harmony: A hands-on introduction Fast Data Science is excited to be partnering with UK Data Service to deliver a practical workshop on how to best use Harmony for analysing data in the social sciences.

What we can do for you

Transform Unstructured Data into Actionable Insights

Contact us