Skip to content
To news Blog

Automotive

Automotive
Written by
Data Science Lab
Published on
11 August 2021
In recent years, the automotive industry has gained access to vast amounts of data in many forms. This ranges from a simple inventory of specific cars to in-car sensor data collected to provide information. More and more car manufacturers are using this data to develop smarter, more efficient cars. The results are not limited to futuristic self-driving cars; they also appear in other vehicle features. For example, sensors can indicate when certain parts are due for inspection or replacement. Car manufacturers are not the only organisations in the industry that could make use of data. Leasing companies, car dealers and importers could do so too. They are all at different stages of collecting and using data. In short, data and artificial intelligence (AI) are driving significant advances. In this blog, we look at four data science use cases that could be relevant and valuable to organisations in the automotive industry.

Calculating residual value using Tweets

A lease car’s residual value is important information for leasing companies because it has a significant bearing on the lease rates they offer customers. Accurately calculating a new car’s residual value can help a leasing company set an appropriate rate and maximise its profit. A great deal of information is now available online, including general sentiment, news articles and posts on internet forums. These can indicate the popularity of particular cars or car brands. This large volume of text data can be combined with the car data a leasing company already holds, such as make, engine capacity and number of doors, to predict residual value as accurately as possible using machine learning models.

The data we use must first be converted into numbers. This matters because raw text made up of words and letters cannot be used as input for a machine learning model. For NLP, word embeddings often work well as a way to represent text. The best-known word embedding models are word2vec, fastText and GloVe. When choosing a machine learning model for an NLP task, neural networks are often a good option. Long Short-Term Memory (LSTM) is a well-known approach, but a Convolutional Neural Network (CNN) also performs well when making predictions from text.

Finally, choosing the right time window for the text data is important. To calculate a car’s residual value on 1 September 2021, we could include all social media posts, car forum discussions and news articles from the past month in our model. But we do not know whether one month is enough; we may need at least 2, 3 or 4 months.

Canonicalisation

A common problem in organisations is that their data is not standardised. This means that the same value in a field is not always described in the same way. If a dataset contains both “Mercedes-Benz C Klasse” and “Mercedes Classe C”, we can quickly see that they refer to the same type of car. A database or computer, however, will generally treat them as two different things. This creates inconsistencies when we model the data and generate insights. To build robust predictive models and produce accurate insights, we need the data to be consistent. We want to convert all data that is not clean to a standardised name. First, we need to decide how we ideally want to describe the data and draw up a standardised list. This list contains all make and model names, written as we want them to appear. If “Mercedes-Benz C Klasse” is a standard name on that list, we want to convert data points labelled “Mercedes C-Klasse”, “Mercedes C220”, “Benz Klasse C” or “Mercedes-Benz C220d Automaat”, for example, to that standard name. We want to minimise manual corrections to the data, so we are looking for a way to automate the standardisation process.

We could approach this process in several ways. One simple but effective option is fuzzy string matching. This lets you match the input data – in our case, the make and model names you want to standardise – against the names in your standardised list. Fuzzy string matching matches two pieces of text that are not identical but are approximately or partially similar. One way to measure the similarity between two pieces of text is the Levenshtein distance. Essentially, it indicates how many characters need to be changed to make the two pieces of text identical.

One advantage of fuzzy string matching is that it is relatively straightforward to implement. Unlike with traditional machine learning models, you do not need to train on the data before matching text. You can match pieces of text directly. This also means that data points that occur infrequently can potentially be matched successfully, whereas machine learning models often need a lot of data before they can classify certain labels. A drawback of fuzzy matching is that texts need to be somewhat similar for a match to be found. With examples such as “C-Klasse”, “C Classe” and “Klasse C”, we can be fairly confident of finding a match. But with examples such as “C220” and “C-Klasse”, finding a match quickly becomes much harder, even though they refer to the same car model.

The previous example is well suited to traditional machine learning models. Models such as Random Forest are often effective at finding relationships that are not obvious at first glance. With enough training data, a Random Forest could quickly learn that a “C220” is a “C-Class”. Alongside tree-based models such as Random Forest and XGBoost, neural networks such as LSTMs are often effective for this type of problem. Besides choosing the type of predictive model, we first need to consider how to represent the words in a text. One way is to use a TF-IDF matrix. This matrix contains every word in the dataset, with a numerical value assigned to each word. The value represents how ‘important’ a word is in a piece of text compared with all the texts in the dataset.

As mentioned earlier, an advantage of these predictive models is that they are often highly accurate, provided there is enough data (though this requirement can also be seen as a disadvantage). They are often less effective at identifying outcomes that occur rarely in the data or are entirely new. Periodically retraining the model is therefore often necessary.

Object Detection: damage detection

We have all heard that accidents can happen when you least expect them. Driving carries a considerable risk of accidents, and damage to the vehicle itself can be costly. For leased cars, the driver is often responsible for damage. Checking for damage at the end of a lease is a process that still involves many manual steps and has considerable potential for automation.

Object detection algorithms such as R-CNN and YOLO can use machine learning and cameras to identify new damage. Before a new lease car is delivered to the driver, cameras can inspect it to establish its original condition. At the end of the lease term, the cameras can inspect the car again and compare it with that condition. This makes it possible to identify quickly, with minimal manual work, whether the car has been damaged during the lease. The findings can also provide an immediate estimate of the potential repair costs.

Detecting fuel card fraud

Many employers offer their employees a fuel card to make it easy to pay for business mileage. This means employees do not have to keep track of and claim their business mileage afterwards. Unfortunately, fuel cards also carry a risk of fraud. Criminals can skim a fuel card and use it to pay for fuel at considerable cost to the employer. Employees themselves can also commit fraud, for example by regularly lending the card to family members or friends.

To detect this type of fraud early and avoid high costs, we can use machine learning methods to predict whether a transaction is fraudulent or legitimate. Fraud detection is a common challenge in data science. These solutions often focus on credit cards, but the underlying techniques can be used for any type of transaction, provided enough data is available. Algorithms such as XGBoost can detect potential fraud when enough labelled data is available. Even without labels, we can use unsupervised methods such as Isolation Forest and Random Cut Forest to identify anomalies (fraud) in transaction data.

Curious about the possibilities?

Does your organisation handle a lot of recurring questions? Are you looking to start a data science project, or are you curious about which data-driven solutions would suit you? Get in touch with no obligation to explore how we can help you achieve your data-driven goals. Together, we create the future.

Blog

You may also find this interesting,

Sign up for our newsletter.

Want to be the first to hear about a new blog post?

Enter a valid email address.